Basic feature 21, text name "wildcard"
Meaning of special symbols
* Any character of any length
? Any single character
[: Alnum:] Large, lowercase letters and numbers
[: Alpha:] large, small letter
[: Upper:] Uppercase
[: Lower:] lowercase letters
[:d Igit:] Number
[: Space:] white space characters
[:p UNCT:] Special symbols
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/F1/wKiom1XbC1_i8LciAAC5wHQyXmI329.jpg "/>
Displays files that begin with a non-letter in/tmp
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/ED/wKioL1XbDXThaEXbAACc6mVDwkQ238.jpg "/>
Copy the files ending in/etc under. D to/tmp/1/
2. Key combination
Ctrl+l Clear Screen
CTRL + a back to command line
Ctrl+e back to command line end
CTRL + C cancels execution of commands
Ctrl+u Delete the cursor to the beginning of the content
Ctrl+k Delete the cursor to the end of the line
3. IO Redirection and piping
Standard input Keyboard 0/dev/stdin
Standard output Monitor1/dev/stdout
> Overwrite redirects
>> Chasing heavier orientation
Set-c overwrite redirect, if file exists, do not execute
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/ED/wKioL1XbDXWwQP9DAALAxphK8Jw697.jpg "/>
+c back to normal, can overwrite redirect to existing file
Standard Error Output Monitor 2/dev/stderr
Error redirection
2> Error Overwrite redirect
2>> Error Append redirect
Simultaneous redirection (correct + error)
1. COMMAND >/path/to/file.out 2>/path/to/file.err
2. COMMAND >/path/to/file.out 2>&1
3. COMMAND &>/path/to/file.out
Input redirect
<<
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/F1/wKiom1XbC2DgNMV3AACaMVvB-QI867.jpg "/>
TR command
-D Delete
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/F1/wKiom1XbC2HgfGR4AATLy1yrQUc903.jpg "/>
The former command: A-Z of uppercase letters to replace the lowercase a-Z
The latter command: remove a-f letters
Tee command
Used to redirect data to a file, on the other hand, you can also provide a copy of the redirected data as a stdin of subsequent commands. The simple thing is to redirect the data to a given file and screen.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/EE/wKioL1XbDXbR6EkZAACCfT-CRMc495.jpg "/>
WC, cut, sort, uniq
WC command Word Count
-L count rows
-W statistical number of words
-C Statistics byte number
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/F1/wKiom1XbC2Hz9KzSAAAtCgi9JNk280.jpg "/>
From left to right, number of lines of words in bytes
Cut command
-D Specify delimiter
-F Displays the specified column
#显示 # Columns
#-#显示 # to # columns
#,#, #显示 #,#, #列
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/EE/wKioL1XbDXbSD0AZAAE4D8aorbE507.jpg "/>
Sort order Output
-T Specify delimiter
-K #按照指定的列排序
-n Sort by numeric size
-R Reverse Order
-F ignores case
-U sort after go heavy
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/F1/wKiom1XbC2KRy-GLAAE0HWreuao832.jpg "/>
To: As a delimiter, sort by the numeric size of the third column value
Uniq command unique to redirect to row operations
-C Displays the number of repeats per line
-D displays only duplicate rows
-U displays only non-repeating rows
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/EE/wKioL1XbDXfS25G-AAEXAyxU4LI481.jpg "/>
Command 1, deduplication and display of repeat times
Command 2, only duplicate rows are displayed
Command 3, show only rows that are not duplicates
8.23 Lesson-3