The tail program is a tool used to view the last few lines of a file.
For a cool graphical version, see root-tail.
It's frequently useful to see only the last 20 or so lines of a log file (which would have the most recent 20 entries), for example if there's something that just went wrong with my computer.
- See only the last 20 lines of the file /var/log/messages
$ tail -20 /var/log/messages
- To continously monitor the file /var/log/messages
$ tail -f /var/log/messages
- Another tail man page