Cat [-AbEnTv] File Path: displays the specified file in read-only mode. parameters:
1)-A: equal to-vET. special characters can be listed instead of blank characters.
2)-B: list the row numbers. Only the row numbers of non-empty rows are listed.
3)-E: The end of the broken line is displayed as a $ sign.
4)-n: print the travel number (including blank lines)
5)-T: display the Tab key as ^ I
6)-v: lists some special characters that cannot be seen.
2. tac file path: displays the file from the back to the front.
3. nl [-bnw] File: Add row number output, parameter:
1)-B: Specifies the display mode.-B a: lists the row numbers including empty rows;-B t: lists the row numbers of non-empty rows (default ).
2)-n: Used to list the representation of a row number.-n ln: the row number is displayed on the leftmost side of the screen.-n rn: the row number is displayed on the rightmost side of its own field, -n rz: the row number is displayed on the rightmost side of the field, and 0 is added.
3)-w: number of digits occupied by the row number field
The preceding commands directly display the entire file on the screen. The following commands can be used for paging.
4. more file path: displays the file by page. The shortcut keys are as follows:
Space key: Flip down
Enter: Next line
/String: Search down the specified string
Q: leave more
B or ctr + B: Previous Page, invalid for Pipeline
5. less file path: displays the file by page. The shortcut keys are as follows:
Space key or pagedown: Page flip down
Pageup: page up
/String: Search down the specified string
? String: Search for the specified string
N: Repeat the previous search.
N: Repeat the previous search in the direction.
Q: leave more
6. head [-n] number file path: list the first n rows of an object. If n is negative, it indicates where the last n rows are listed.
7. tail [-fn] number file path: Take the following lines. parameters:
-Nnumber: displays the last number row. By default, the last 10 rows are displayed. If + rows are added before the number, the content after the number row is displayed.
-F: The file name followed by continuous detection, which must be terminated by ctr + c. (Often used to listen to log files)
8. od [t TYPE] File: reads binary files. The TYPE is displayed by default. c: Uses ASCII characters for output. d [size]: use decimal to output data. Each integer occupies size bytes. f [size]: use floating point numbers to output data. Each integer occupies size bytes. o [size]: Use Octal numbers to output data, each integer occupies size bytes; x [size]: The hexadecimal system is used to output data, and each integer occupies size bytes.
9. touch [-acdmt] File: Create an empty file, or modify the Time of the file. parameters:
1)-a: Revise atime only
2)-c: only the time when the file is modified. If the file does not exist, no new file is created.
3)-d: the date to be revised, instead of the current date. You can also use the-date = "date or time" statement such as "2 days ago ".
4)-m only modifies mtime
5)-t can be followed by the time to be modified instead of the current time. The format is [YYMMDDhhmm]
If the specified file does not exist, the time of creating an empty file is the current time.