The line terminator for Linux is: [$]
The line terminator for Windows is: [$+ carriage return]
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
(21)
Cat: Connect and display
-N: When displayed, the number of each line
-E: Displays the Terminator.
Example: Cat/etc/issue
Cadt-n/etc/issue
(22)
Split screen display:
More, less
MORE: Turn backwards
Less: Flip forward
(23)
Head: View Top N rows
Tail: View after n rows
-N: The default value is 10.
In fact,-n can be directly used-2 and other numbers instead.
Tail-f: Look at the end of the file, do not exit, wait for the new content appended to this file to be displayed; (Very useful command)
Explanation: If another program appends content to the end of the file, it is displayed directly in the current program.
(24)
Text Processing:
Cut, join, SED, awk
(sed awk grep is known as the three great tools of text processing)
Cut
-D: Specifies the field delimiter, which is the default space
-F: Specify the fields to display
-F 1,3: shows the first and third one.
-F 1-3: Shows the first to the third one.
Cases:
Cut-d:-F 1/ETC/PASSWD
(25)
Sort text: Sort by default in ASCII table order.
-N: Numeric sorting
-R: Descending
-T: Field delimiter
-K: Which field is the keyword to sort
-U: The same row is only displayed once after sorting
-F: Ignore character capitalization when sorting
Linux Fundamentals 02