Name
tail — stdin stdout - file -- opt --help --version
Synopsis
tail [options] [files]
The tail command prints the
last 10 lines of a file, and does other tricks as well.
$ tail myfile
The ultra-useful -f option
causes tail to watch a file
actively while another program is writing to it, displaying new
lines as they are written to the file. This is invaluable for
watching log files in active use:
$ tail -f /var/log/messages
Useful options
|
|
Print the last
|
|
|
Print the last
|
|
|
Print all lines
except the first
|
|
|
Print the last
|
|
|
Keep the file open,
and whenever lines are appended to the file, print them.
This is extremely useful. Add the |
|
|
Quiet mode: when
processing more than one file, don’t print a banner above
each file. Normally |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access