unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

TAIL(1)                     General Commands Manual                    TAIL(1)



NAME
       tail - display the last part of a file

SYNOPSIS
       tail +|-number [ lbc ] [ f ] [ filename ]
       tail +|-number [ l ] [ rf ] [ filename ]

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

OPTIONS
       Options are all jammed together, not specified  separately  with  their
       own `-' signs.

       +number
              Begin copying at distance number from the beginning of the file.
              number 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.  If number  is  not  specified,
              the value 10 is used.

       -number
              Begin copying at distance number from the end of the file.  num-
              ber is counted in units of lines, blocks or characters,  accord-
              ing to the appended option l, b, or c.  When no units are speci-
              fied, counting is by lines.  If number  is  not  specified,  the
              value 10 is used.

       l      number is counted in units of lines.

       b      number is counted in units of blocks.

       c      number is counted in units of characters.

       r      Copy  lines  from  the  end  of  the file in reverse order.  The
              default for option r is to print  the  entire  file  in  reverse
              order.   number  is  the count of lines from the end of the file
              regardless of sign.  Option r may not be used with b or c.

       f      If the input file is not a pipe, do not terminate after the line
              of  the  input  file has been copied, but enter an endless loop,
              sleeping for a second and then attempting to read and copy  fur-
              ther  records  from  the input file.  This option may be used to
              monitor the growth of a file that is being written by some other
              process.  For example, the command:

                     tail -f fred

              will  print the last ten lines of the file fred, followed by any
              lines that are appended to fred between the time tail is  initi-
              ated and killed.  As another example, the command:

                     tail -15cf fred

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

SEE ALSO
       dd(1)

BUGS
       Data  for a tail relative to the end of the file is stored in a buffer,
       and thus is limited in size.

       Various kinds of anomalous behavior may happen with  character  special
       files.



                                14 August 1989                         TAIL(1)