Commands to learn in this section:Cat (TAC), More,less,head,tail,cut,sort,uniq,wc,tr
Skills learned in this section: Directory Management
File Management
Date Time
View text
Split screen Display
Text Processing
Summary of File management commands:
Directory Management :
LS, CD, pwd, mkdir, rmdir, tree
File Management :
Touch, stat, file, RM, CP, MV, Nano
Date Time :
Date, clock, Hwclock, Cal
To view text :
Cat, TAC, more, less, head, tail
Cat: Connect and display
-N: Numbering each line when displayed
-E: Displays the line terminator for each line
(TheTAC command displays the text in turn)
split screen display :
More, less
MORE: Support Backward, (disadvantage: Turn to the end of the file to exit)
Less: Same as using the Man command (because the file is opened with less when using the man command)
head: View Top N rows ("n" defaults to 10)
tail: View after n rows
-N: Show first few lines
Tail-f: Look at the end of the file, do not exit, wait to display the subsequent append to this file new content;
Text Processing :
Cut, join, SED, awk
cut: Cut files
-D: Specifies the field delimiter, which is the default space
-F: Specify the fields to display
-F 1, 3: Show First and three fields
-F 1-3: Show first to third field
Sort: Text sort (default is sorted by ASCII code in ascending order)
-N: Sort by numeric size
-r: Sort by ASCII code descending
-T: Field delimiter
-K: Which field to sort the keywords for (sort-t:-K3/ETC/PASSWD)
-U: The same row is only displayed once after sorting
-F: Ignore character capitalization when sorting
uniq: report which row has duplicate content (adjacent)
-C: Shows the number of rows in a file that repeats
-D: Show only duplicate rows
WC (Word count): Text statistics (you can count how many lines, how many words, how many bytes in a file)
-L: Show only the number of rows
-W: Displays only the number of words
-c: Show only bytes of characters
-L: Shows how many characters are on the longest line
TR: Character processing commands (converting or deleting characters)
TR [OPTION] ... SET1 [SET2]
-D: Delete all characters that appear in the character set
Linux Beginner's Note four: The Linux file Management class command is detailed! (Video serial number: 03_1)