Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tail(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd

pg

tail

PURPOSE

     Writes a file  to standard output, beginning  at a speci-
     fied point.

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


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).

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 begin-
               ning of the input.
     -[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 (Alt-Pause).

RELATED INFORMATION

     The following command:  "dd" and "pg."

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