Copy the last part of files (POSIX)
tail [-number] [-c|-l] [-f] [-n number] [file]...
|If the sign is:||Then copying starts relative to the:|
|+||Beginning of the file|
|-||End of the file|
|none||End of the file|
If you omit the -n number option, the default is -10 (i.e. the last ten units -- lines or bytes -- of the file).
The tail utility copies its input files to the standard output, beginning at a designated place.
Copying begins at the point in the files indicated by the -n number option. The argument number is counted in units of lines or bytes, according to the -l and -c options.
When tail is applied to a nonseekable file (e.g. a tty), tail must maintain an internal buffer. This buffer is large enough to hold at least 10 lines of characters.
You can use the -f option to monitor the growth of a file that is being written by a process. For example, the command:
tail -f fred
prints the last ten lines of the file fred, followed by any lines that are appended to fred between the time tail is initiated and terminated. As another example, the command:
tail -cf -n 15 fred
prints the last 15 bytes of the file fred, followed by any lines that are appended to fred between the time tail is initiated and terminated.
cat, head, less, more