Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tail(1) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

dd(1M)

head(1)

more(1)

pg(1)

tail(1)






       tail(1)                                                      tail(1)


       NAME
             tail - deliver the last part of a file

       SYNOPSIS
             tail [-f][-c number | -n number] [file]
             tail _[number][c|l|b][f|r] [file]

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

             tail processes supplementary code set characters according to
             the locale specified in the LC_CTYPE environment variable [see
             LANG on environ(5)], except that multibyte characters may be
             split, and so not be displayed correctly, when the -b or -c
             options are specified.

       OPTIONS
             -c number
                   If number has no sign, or has a negative sign (-), tail
                   will start copying at the absolute value of number bytes
                   from the end of the file. If number has a + in front of
                   it, copying starts at number bytes from the start of the
                   file.  The origin for the value of number is 1.
                   Therefore, -c +1 represents the first byte of the file,
                   and -c -1 the last byte of the file.

             -n number
                   This option is the same as the -c option, except the
                   unit is lines rather than bytes. Therefore, -n will
                   start copying at number lines from the start or end of
                   the file, rather than number bytes. The origin for the
                   value of number is 1.  Therefore, -n +1 represents the
                   first line of the file, and -n -1 the last line of the
                   file.

                   If neither -c nor -n is specified, the option -n 10 will
                   be assumed.

             -f    With the -f (follow) option, if the input is not a pipe,
                   the program will not terminate after the line of the
                   input file has been copied, but will enter an endless
                   loop, wherein 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


                           Copyright 1994 Novell, Inc.               Page 1













      tail(1)                                                      tail(1)


                  is being written by some other process.

            _[number][c|l|b][f|r]
                  If +number, copying begins at distance number from the
                  beginning of the input.  If -number, copying begins at
                  distance number from the end of the input.  If number is
                  null, the value 10 is assumed.  Number is counted in
                  units of lines, blocks, or bytes, according to the
                  appended option l, b, or c.  When no units are
                  specified, counting is by lines.

                  If number is not null, then:

                        +numberc is equivalent to -c +number
                        +numberl is equivalent to -n +number
                        -numberc is equivalent to -c number or -c -number
                        -numberl is equivalent to -n number or -n -number

                  The f option in this synopsis is identical to the normal
                  -f option.

                  The r option copies lines from the specified starting
                  point in the file in reverse order.  number is the count
                  of lines from the end of the file, regardless of the
                  sign.  The default for r is to print the entire file in
                  reverse order.

                  The r and f options are mutually exclusive.

      EXAMPLES
            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
            initiated and killed.  As another example, the command:
                  tail -f -c 15 fred

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

      FILES
            /usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
                  language-specific message file [See LANG on environ
                  (5).]


                          Copyright 1994 Novell, Inc.               Page 2













       tail(1)                                                      tail(1)


       REFERENCES
             cat(1), dd(1M), head(1), more(1), pg(1), tail(1)

       NOTICES
             Tails relative to the end of the file are stored in a buffer,
             and thus are limited in length.  Various kinds of anomalous
             behavior may happen with character special files.  The tail
             command will only tail the last {LINE_MAX}*10 bytes of a file
             regardless of its line count.

             The second synopsis form (_[number][c|l|b][f|r]) may be
             removed in future releases, and so should be avoided.




































                           Copyright 1994 Novell, Inc.               Page 3








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