Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tail(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd(C)


 tail(C)                         19 June 1992                         tail(C)


 Name

    tail - display the last part of a file

 Syntax

    tail [ +-[number ] [ lbc ] [ -f ] ] [ file ]

 Description

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

    Copying begins at distance +number from the beginning, or -number from
    the end of the input (if number is null, the value 10 is assumed).  num-
    ber 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.

    With the -f (``follow'') option, if the input file is not a pipe, the
    program will not terminate after the last line of the input file has been
    copied, but will enter an endless loop, in which it sleeps for a second
    and then attempts to read and copy further records from the input file.
    Thus it may be used to monitor the growth of a file that is being written
    by some other process.  For example, the command:


       tail -f file


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

 See also

    dd(C)

 Notes

    Tails relative to the end of the file are kept in a buffer, and thus are
    limited to approximately 300 lines.  Unpredictable results can occur if
    character special files are ``tailed.''

 Standards conformance

    tail is conformant with:

    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


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