All rights reserved, please indicate the source when citing
tail - Read the End of a File
The tail command is used to display the end portion of a file. It allows you to quickly view the last few lines of a file.
The syntax of the tail command is as follows:
tail [OPTIONS] [FILE] .heat 。
Common options for the tail command include:
- -n: Specify the number of lines to display.
- -c: Specify the number of characters to display.
- -q: Display only non-empty lines.
- -v: Display only empty lines.
- -f: Continuously monitor a file and keep displaying it as new content is added.
Example:
$ seq 1 100 | tail -n 5 ←Read the last 5 lines of text
96
97
98
99
100
$ tail FILE ←Read the last 10 lines of text from FILE |
You can find more detailed options and examples in the provided link.