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 as they grow:
➜ 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 |
Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.