Special symbols sort_wc_uniq command tee_tr_split command

 * any number of arbitrary characters

? any character

 # comment character

  \ escape character

  | pipe character (mentioned earlier)

cut command:

cut -d "" -f # (-d defines the delimiter -f # displays the number of columns)

cut -c # (-c # is to display the first few characters)

sort command (mainly used for sorting (so that the content of the file is not changed), often combined with uniq (de-duplication)):

sort -n (sort numerically, but if there are letters, it will be regarded as 0 by default, that is, the letters are in the front)

sort -r (reverse sorting, just the opposite of sort -n) Others are rarely used, basically use sort -n or sort -r

wc command (mainly used for statistics):

wc -l count lines

wc -m count characters

wc -w count the number of words or the number without separation (usually with spaces as the separator)

 Supplement: cat -A file_name to view all characters

uniq command (remove duplication, but don't change the content of the file itself):

uniq -c  

tee command (same as append >> command):

tr command (replacement characters):

split command (cut):

split -b size file_ame (split by the specified size (the default unit is Bye bytes, such as: split -b 100M file_name ))

split -l #### file_name (split by the specified number of lines (# : number of lines))

Special sign extension:

$ variable prefix

; (semicolon) When multiple commands are on the same line, the commands are separated

~ represents the home directory of the current user

& executes in the background, or means all (true and false) sleep 300 &

>  >>  2> 2>>  &> &>>

> means write >> means append 2 means false output & means (all outputs (true and false))

[ ] means any character or range within square brackets

|| means or

&& means and

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324810355&siteId=291194637