Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities

tail

Oregon Coast

tail
Previous | Next

        Copy the Last Few Lines or Bytes of a File to Stdout

Usage:  tail [-hcfnq-] [-i<sec>] [-m<msec>]
             [-+<start>] [-t<tabs>][ file1 file2 ... ]

   tail copies the last part of the file you specify onto
   stdout.  You may specify where to begin copying in either
   lines or bytes measured from either the beginning or the
   end of the file.  If no file is given, tail reads from stdin.
   If several files are given, each is annouced unless you
   specify quiet mode.

Options:

   -h         Help.  (This screen.)
   -c         Count characters.  (Default is lines.)
   -f         Follow.  At end of file, go into an endless loop,
              sleeping for a second, then waking up to see if
              more data's been added.  (Use ^C to exit.)  The
              follow option is not valid if more than one file
              is specified and is ignored if data is being read
              from a pipe.
   -i<sec>    Interval in seconds between checking for more data
              if -f option is used.  (If the interval specified
              is greater than one second, tail will temporarily
              drop back to a one second interval anytime it finds
              new data when it does wake up.)
   -m<msec>   Interval in milliseconds between checking for more
              data if -f option is used.
   -<start>   Starting point, relative to the end of the file.
              (Default is last 10 lines or 512 bytes.)
   +<start>   Starting point, relative to the start of the file.
   -t<tabs>   Tab settings to use for viewing text.  (Default is
              to use value given by the TABS environment variable
              or, if  that's undefined, to do no tab expansion.)
   -n         No tab expansion.
   -q         Quiet mode.  Don't announce the name of each file
              it's read.
   --         End of options.

Previous | Next