Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd(1)

TAIL(1)  —  USER COMMANDS

NAME

tail − display the last part of a file

SYNOPSIS

tail +|− number [ lbc ] [ fr ] [ filename ]

DESCRIPTION

tail copies filename to the standard output beginning at a designated place.  If no file is named, the standard input is used. 

OPTIONS

Options are all jammed together, not specified separately with their own ‘−’ signs. 

+number
Begin copying at distance number from the beginning of the file.  number is counted in units of lines, blocks or characters, according to the appended option l, b, or c.  When no units are specified, counting is by lines.  If number is not specified, the value 10 is used. 

−number
Begin copying at distance 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.  When no units are specified, counting is by lines.  If number is not specified, the value 10 is used. 

l number is counted in units of lines. 

b number is counted in units of blocks. 

c number is counted in units of characters. 

r Copy lines from the end of the file in reverse order.  The default for r is to print the entire file in reverse order. 

f If the input file is not a pipe, do not terminate after the line of the input file has been copied, but enter an endless loop, sleeping for a second and then attempting to read and copy further records from the input file.  This option may be used to monitor the growth of a file that is being written by some other process.  For example, the command:

tail −f fred

will print the last ten lines of the file fred, followed by any lines that are appended to fred between the time tail is initiated and killed.  As another example, the command:

tail −15cf fred

will print the last 15 characters of the file fred, followed by any lines that are appended to fred between the time tail is initiated and killed. 

SEE ALSO

dd(1)

BUGS

Data for a tail relative to the end of the file is stored in a buffer, and thus is limited in size. 

Various kinds of anomalous behavior may happen with character special files. 

Sun Release 4.0  —  Last change: 9 September 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026