tail - Deliver the last part of a file


tail [ +|-number[lbc] ] file


Tail copies the named file to the standard output beginning at a designated place.

Copying begins at distance +number from the beginning, or -number from the end of the file. Number is counted in units of lines, blocks or characters, according to the appended option l, b or c. If no number is specified, -10 is assumed. When no unit is specified, counting is by lines.


tail logfile

Displays the last 10 lines in logfile.

tail +10 logfile

Displays lines from 10 through the end of logfile.

tail -256c logfile >lastpage

Writes the last 256 characters in logfile to the file lastpage.

See Also

cat(C), grep(C)


Various kinds of anomalous terminal behavior may happen with binary data files.