Linux Learning Notes--shell Basics (eight)

+++++++++++++++++++++++++ +++++shell Foundation +++++++++++++++++++++++++++++++1. Shell overviewShell definition:The Shell is a command-line interpreter that provides users with an interface system-level program that sends a request to the Linux

Common Linux shell command combinations

Serial number Task Command combination 1 Delete a 0-byte file Find. -type f-size 0-exec rm-rf {} \;Find. Type F-size 0-delete 2 View processes, sorted by memory from large to small PS-E-O "%c:

Shell command operations for Linux

1. At the command terminal to get root user rightsIn the terminal, enter:sudo passwd rootEnter new UNIX Password: (enter your password here)Retype new UNIX Password: (Determine the password you entered)Passwd:password updated successfullyLater, if

Linux Shell WC Command

1. Syntax and options Short Option Long Option Option Description -C –bytes Print the byte counts -M –chars Print the character counts -L –lines

July 21, 2014 (shell Learning 1)

Instance 1: Step 1: Use VI to create a file **. Sh (this is not introduced here) #! /Bin/bash Note: This specifies the shell to explain the following command. CD/var/log # Switch the directory to/var/log (# It is the annotator in

Shell script parsing 5 ---- loop statements

I. For LoopFor VaR in [LIST]Do# Code blockDone$ VaR is a loop control variable. [LIST] is a set that VaR needs to traverse. The do/done pair contains the loop body. If do and for are written in the same line, you must add ";" before do, for example,

Shell scripts Note 2

Use the date command to convert the Basic time second to year, month, and day: Command: Date-d @ 1281161747 Be sure not to forget the symbol "@" # Obtain the current time by date # Date-d "-1 week" + % Y % m % d get last week date (day, month,

Shell programming Basics

(1) it must start with the following line (the first line of the file must be placed ):#! /Bin/shSymbol #! The program used to tell the system to run the script. This example uses/bin/sh. After the editing is completed and saved, it is assumed that

Share the memcached shell startup and stop script

Note: To use this shell, you must first successfully create the memcache environment 1 and create the memcached file and permission [email protected] ~] # Touch/etc/init. d/memcached [[email protected] ~] # Chmod + x/etc/init. d/memcached2 write the

Definition in Shell

Tag: Shell In Shell, some symbols are processed differently under different definitions. There are three main methods to define them: (1) single quotes (2) double quotation marks (3) reverse quotation marks Double quotation marks and single

Shell script record

Execute another shell script in the shell scriptYou can execute another shell script (or non-executable file, mainly used to obtain the value of some variables) in one shell script :. file name (including path) or variable = file name (including

IFS in Shell

1. Introduction to IFS The shell script has an internal domain separator called ifs (internal field seprator. The complete definition is the shell uses the value stored in IFS, which is the space, tab, and newline characters by default, to delimit

Shell script ----- Function

Tag: Please user null Syntax format Function Name (){ Function body } Function Name -------------------------- Function body can contain command loop judgment Example: Determine whether a user exists. The output user ID and shell exist. #!

Restart Tomcat using shell Array

#! /Bin/bashExport AT1 = "/usr/local/export AT1 /"Tomcat2 = "/usr/local/tomcat2 /"Tomcat3 = "/usr/local/tomcat3 /"Tomcat4 = "/usr/local/tomcat4 /"Tomcat = ($ tomcat1 $ tomcat2 $ tomcat3 $ tomcat4)# For (I = 0; I # $ {Tomcat [$ I]} bin/shutdown.

Efficiency in Shell

I recently wrote a shell script, which has high efficiency requirements, so I read some articles. I feel that this article is really good. The example in this article is really great! Institute Use me to extract them: @ 1: instance: Requirement:

Five-year installation and maintenance Shell

ShellList the 10 most frequently used shellsHistory | awk '{A [$2] ++} end {for (I in a) {print a [I] "" I}' | sort-Rn | HEADHistory | awk '{A [$4] ++} end {for (I in a) {print a [$ I] & quot; i} '| sort-Rn | HEADGrep-V "#". bash_history | awk '{++

Shell special Variables

Tag: Process Using Div string shell script$0: Script Name $1-$9: location parameter #2-#9 $ {10}: location parameter #10 $ #: Number of location parameters "$ *": all location parameters (as a single string) "[email protected]": All location

Why use shell scripts?

Why shell script classification: Linux Shell script learning 78 people read comments (0) the add-to-favorites shell script task job s h e l script saves a lot of time in Processing Automatic loops or large tasks and is powerful. If you have a

Shell output redirection

When running commands in Linux Shell, each process is associated with three open files and uses file descriptors to reference these files. Because the file descriptor is not easy to remember, shell also provides the corresponding file name. Standard

[Shell] input parameters

[Shell] input parameters Obtain the input parameters of the shell script and the obtained parameters. #! /Bin/bash # title: testPT. sh # atuhor: orangleliu # date: 2014-08-08 # desc: enter two parameters and the second digit. Print them if they are

Total Pages: 541 1 .... 392 393 394 395 396 .... 541 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.