.\" Copyright (c) 1980, 1990, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the Institute of Electrical and Electronics Engineers, Inc. .\" .\" %sccs.include.redist.roff% .\" .\" @(#)tail.1 6.6 (Berkeley) 06/27/91 .\" .Dd .Dt TAIL 1 .Os BSD 4 .Sh NAME .Nm tail .Nd deliver the last part of a file .Sh SYNOPSIS .Nm tail .Oo Cm \\*(Pm Ns Ar number .Op Ns Cm lbc Op Ns Cm fr .Oc .Op Ar file .Sh DESCRIPTION The .Nm tail utility copies its input file to the standard output beginning at a designated place. The argument .Ar number is counted in units of blocks, characters or lines (default), according to the appended option suffixes .Cm b , c and .Cm l . Copying begins at the point in the file indicated by the .Cm \\*(Pm Ns Ar number option, where .Cm + Ns Ar number is a positive offset relative to the beginning of the file and .Cm \&- Ns Ar number is a negative offset relative to the end of the file or standard input. .Pp Appended options: .Bl -tag -width Ds .It Cm b The argument .Ar number refers to blocks. .It Cm c The argument .Ar number refers to characters (bytes). .It Cm f Specifying .Cm f causes .Nm tail to not quit at end of file, but rather wait and try to read repeatedly in hopes that the file will grow. .It Cm l The argument .Ar number refers to line. .It Cm r Lines are printed from .Ar file in reverse order. The default for .Ar r is to print the entire file this way. .El .Pp The .Nm tail utility exits 0 on success, and >0 if an error occurs. .Sh SEE ALSO .Xr dd 1 .Sh BUGS The behaviour of .Nm tail on binary or special files is unpredictable. .Sh HISTORY A .Nm command appeared in .At v7 .