the -n option is not supported), the last 20 lines and the last 50 bytes of filename can be shown with the following command: tail -20 filename tail -50c filename However this syntax is now obsolete and does not conform with the POSIX 1003.1-2001 standard. Even if still supported in current versions, when used with other options (like -f, see below), these switches could not work at all. As with all Unix commands, use man pages on the running system for specific options and actions. File monitoring has two special command line option and (follow) that allows a file to be monitored. Instead of just displaying the last few lines and exiting, displays the lines and then monitors the file. As new lines are added to the file by another process, updates the display. This is particularly useful for monitoring log files. Ancient versions of tail poll the file every second by default but tail from the GNU coreutils as of version 7.5 support the inotify infrastructure introduced in Linux kernel version 2.6.13 in August 2005 which only check the file when is notified of changes by the kernel. The following command will display the last 10 lines of messages and append new lines to the display as new lines are added to messages: tail -f /var/adm/messages To keep following the log even when it is recreated, renamed, or removed as part of log rotation, at least BSD and GNU implementations provide a option which is useful in cases when the user is following a log file that rotates. tail -F /var/adm/messages To interrupt while it is monitoring, break-in with Ctrl+C. This command can be run "in the background" with , see job control. If the user has a command's result to monitor, the watch command can be used. There is a GNU Emacs mode that emulates the functionality of , called . See also head (Unix) less (Unix) List of Unix commands References External links GNU Project documentation for tail Unix SUS2008 utilities Unix text processing utilities Plan 9 commands Inferno (operating system) commands IBM i Qshell commands