1 file browsing (Simple review)
1 Cat View the contents of the file
2 more in the form of Page view, but only to page down
3 Less is viewed as a page turn, but can support up and down pages
4 Head default is to view the first 10 lines, but we specify the number of rows to view
5 Tail The default is to view the following 10 lines, but we can specify the number of rows to view
2 keyword-based search
Let's say I created a tmp.cpp in my home directory.
1 command grep searches based on keywords
2 Single keyword search: grep keyword file name
Like I'm searching for Linux in Tmp.cpp.
More than 3 keyword search: grep-e keywords | keywords ... Filename
Like I'm searching in the Tmp.cpp. Contains Linux and test
4 Other parameters for grep
1-i is ignore case
2-n is the line where the result is displayed
3-v is the output of a line without a keyword (equals reverse)
4-ax is the output that contains the result of the row x row after
5-BX is the output of the time contains the result of the row x row before