The linux tail command displays the last n line
- 2020-11-18 06:36:14
- OfStack
tail: The last lines of the output file.
It is convenient for linux to view the log if the log file is: Console.log
Usage:
1. tail Console.log
Output the last 10 lines of the file
tail-nf Console.log --n is the last n line
Output the contents of the n line at the end of the file while monitoring changes to the file and synchronously refresh and display as soon as there is a change in the file
3. tail -n 5 filename
Output the last five lines of the file
4. tail -f filename
Output the last 10 lines while monitoring changes to the file, which is displayed whenever there is a change to the file.