Command format
tail [OPTION] ... [FILE] ...
Command parameters
-C,--bytes=[-]k
Displays the post-K-byte contents of each file.
-F,--follow[={name|descriptor}]
Continuously monitors the specified file, and when the file appends content, the new content is immediately displayed on the screen.
-N,--lines=[-]k
Displays the following K-line content for each file.
--pid=pid
Use with the-f option to terminate tail when the PID process is finished.
-Q,--quiet,--silent
Never displays the header of the file containing the given file name.
-S,--sleep-interval=n
Used in conjunction with the-F option to hibernate N seconds at each repeated interval.
-V,--verbose
Always displays the header of the file containing the given file name.
--help
Displays help information.
--version
Displays version information.
Instance
A) Displays the contents of the/etc/passwd after 5 lines.
tail-n 5/etc/passwdhuey:x:504:504::/home/huey:/bin/bashsugar:x:505:492::/home/sugar:/bin/bashming:x : 506:504::/home/ming:/bin/bashzlee:x:507:504::/home/zlee:/bin/bashgll:x:508:504::/home/gll:/bin/bash
b) Continuously observe the output of the log file App.log.
Tail-f App.log
Linux commands-Tail: Print the end of a file