Details of CentOS file content reference instruction

Time:2019-11-8

1. Cat [- abentv] file path:Display the specified file as read-only. Parameters:

1) – A: equal to – VT, some special characters can be listed instead of blank

2) – B: List line number, only the line number of non empty hundred lines

3) – E: display the ending line break with $sign

4) – N: print out line number (including blank line)

5) – t: Display tab as ^ I

6) – V: list some invisible special characters

2. TAC file path:Display file from back to front.

3. NL [- BNW] file:Add line number output, parameters:

1) – B: specify a good display mode, – B-A: List line numbers including blank lines, – B-T: List line numbers of non blank lines (default).

2) – N: list the representation of the line number, – n-ln: the line number is displayed on the left most side of the screen; – n-rn: the line number is displayed on the right most side of its own field without adding 0; – n-rz: the line number is displayed on the right most side of its own field with adding 0

3) – W: number of occupation digits of line number field

The above instructions are to directly display the entire file on the screen, and the following instructions can realize paging.

4. More file path:The file is displayed in pages. When opening, the shortcut keys are:

Space bar: page down

Enter: next line

/Strings: drill down on specified strings

Q: leave more

B or CTR + B: Previous page, invalid for pipeline

5. Less file path:The file is displayed in pages. When opening, the shortcut keys are:

Space bar or pagedown: page down

Pageup: page up

/Strings: drill down on specified strings

? Strings: searching up a specified string

N: repeat previous search

N: repeat previous search in direction

Q: leave more

6. Head [- n] number file path:List the first n lines of the file. If n is a negative number, it indicates where the last n lines are listed.

7. Tail [- FN] number file path:Take the following lines, parameters:

-Nnumber: display the last number line. The last 10 lines are displayed by default. If + line is added before number, then the content after number line will be displayed

-F: continue to detect the following file name, which needs to be terminated by CTR + C. (often used to listen to log files)

8. Od [T type] file:Read binary files, where the types are: A: display with default characters, C: output with ASCII characters, d [size]: output data with decimal system, and each integer occupies size bytes; f [size]: output data with floating-point number, and each number occupies size bytes; o [size]: output data with octal system, and each integer occupies size bytes; X [size]: use ten Hex to output data, each integer occupies size bytes.

9. Touch [- acdmt] file:Create an empty file, or modify various times 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 will be created

3) – D: you can follow the date you want to revise instead of the current date, or you can use the statement – date = date or time, or you can use the statement “2 days ago”

4) – m only modify Mtime

5) – t can be followed by the time to be revised instead of the current time. The format is [yymmddhhmm]

If the file does not exist, all the time values of the new empty file are the current time.

Recommended Today

The use of progressbarcontrol, a progress bar control of devexpress – Taking ZedGraph as an example to add curve progress

scene WinForm control – devexpress18 download installation registration and use in vs: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100061243 When using ZedGraph to add curves, the number of curves is slower if there are many cases. So in the process of adding curve, the progress needs to be displayed, and the effect is as follows     Note: Blog home page:https://blog.csdn.net/badao_liumang_qizhi […]