.TH tail "" "" Command
.PC "Print the end of a file"
\fBtail [+\fIn\^\fB[bcfl\fB]] [\fIfile\^\fB]
\fBtail [\-\fIn\^\fB[bcfl\fB]] [\fIfile\^\fB]\fR
.PP
.HS
.SH Options:
.IC \fB+\fIn\fR
\fIn\fR counts from beginning of file
.IC \fB\-\fIn\fR
\fIn\fR counts from end of file
.IC \fBb\fR
\fIn\fR is in blocks
.IC \fBc\fR
\fIn\fR is in characters (bytes)
.IC \fBf\fR
Open tail of file, then display new material as it is added to the file.
File remains open until you type interrupt (usually \fB<ctrl-C>\fR).
.IC \fBl\fR
\fIn\fR is in lines (default)
.HE
.B tail
copies the last part of
.IR file ,
or of the standard input if none is named, to the standard output.
.PP
The given
.I number
tells
.B tail
where to begin to copy the data.
Numbers of the form
.RI + number
measure the starting point from the beginning of the file;
those of the form
.RI \- number
measure from the end of the file.
.PP
A specifier of blocks, characters, or lines (\fBb\fR,
.BR c ,
or
.BR l ,
respectively)
may follow the number; the default is lines.
If no
.I number
is specified, a default of \-10 is assumed.
.PP
The \fB\-f\fR option opens the tail of a file, and then displays
new material as it is added to a file.
This command lets you watch a file as it is being built, such as by \fBnroff\fR.
Note that when
.B tail
is invoked with this option, it does not exit; therefore, when you
wish to exit, type the interrupt character (usually \fB<ctrl-C>\fR).
.SH "See Also"
commands,
.Xr "dd," dd
.Xr "egrep," egrep
.Xr "head," head
.Xr "sed" sed
.SH Notes
Because
.B tail
buffers data measured from the end of the file, large counts may not work.
