Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tail(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd

pg



TAIL(1,C)                   AIX Commands Reference                    TAIL(1,C)



-------------------------------------------------------------------------------
tail



PURPOSE

Writes a file to standard output, beginning at a specified point.

SYNTAX


        +-------- -10 --------------------+   +------+   +--------+
tail ---| one of                          |---|      |---|        |---|
        | +---+   +- 10 --+   +--- l ---+ |   +- -f -+   +- file -+
        +-| + |---|1      |---|1 one of |-+
          | - |   +- num -+   |  +---+  |
          +---+               +--| l |--+
                                 | b |
                                 | c |
                                 +---+


-----------------
1 Do not put a blank between these items.


DESCRIPTION

The tail command writes the named file (standard input by default) to standard
output, beginning at a point you specify.  It begins reading at +[num] lines
from the beginning of file or -[num] lines from the end of file.  The default
num is 10.  num is counted in units of lines, blocks, or characters, according
to the subflag appearing after num (see the following flags).  The block size
is 512 bytes.

FLAGS

-f        Does not end after it copies the line of the input file if the input
          file is not read from a pipe, but enters 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 can be used to monitor the
          growth of a file being written by another process.

+[num]l

+[num]b

+[num]c   Begins reading num lines (l, the default), blocks (b), or characters
          (c) from the beginning of the input.





Processed November 8, 1990         TAIL(1,C)                                  1





TAIL(1,C)                   AIX Commands Reference                    TAIL(1,C)



-[num]l

-[num]b

-[num]c   Begins reading num lines (l, the default), blocks (b), or characters
          (c) from the end of the input.

EXAMPLES

  1. To display the last 10 lines of a file:

      tail  notes

  2. To specify how far from the end to start:

      tail  -20  notes

    This displays the last "20" lines of "notes".

  3. To specify how far from the beginning to start:

      tail  +200c  notes  |  pg

    This displays "notes" a page at a time starting with the "200"th character
    from the beginning.

  4. To follow the growth of a file:

      tail  -1  -f  accounts

    This displays the last line of "accounts".  Once a second, tail displays
    any lines that have been added to the file.  This continues until stopped
    by pressing INTERRUPT (Ctrl-C).

RELATED INFORMATION

See the following commands:  "dd" and "pg."


















Processed November 8, 1990         TAIL(1,C)                                  2



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