1TAIL(1)                          User Commands                         TAIL(1)
2
3
4

NAME

6       tail - output the last part of files
7

SYNOPSIS

9       tail [OPTION]... [FILE]...
10

DESCRIPTION

12       Print  the  last  10  lines of each FILE to standard output.  With more
13       than one FILE, precede each with a header giving the file  name.   With
14       no FILE, or when FILE is -, read standard input.
15
16       Mandatory  arguments  to  long  options are mandatory for short options
17       too.
18
19       -c, --bytes=K
20              output the last K bytes; alternatively,  use  -c  +K  to  output
21              bytes starting with the Kth of each file
22
23       -f, --follow[={name|descriptor}]
24              output appended data as the file grows; -f, --follow, and --fol‐
25              low=descriptor are equivalent
26
27       -F     same as --follow=name --retry
28
29       -n, --lines=K
30              output the last K lines, instead of the last 10; or use -n +K to
31              output lines starting with the Kth
32
33       --max-unchanged-stats=N
34              with  --follow=name,  reopen  a  FILE which has not changed size
35              after N (default 5) iterations to see if it has been unlinked or
36              renamed (this is the usual case of rotated log files)
37
38       --pid=PID
39              with -f, terminate after process ID, PID dies
40
41       -q, --quiet, --silent
42              never output headers giving file names
43
44       --retry
45              keep trying to open a file even when it is or becomes inaccessi‐
46              ble; useful when following by name, i.e., with --follow=name
47
48       -s, --sleep-interval=N
49              with -f, sleep for approximately N seconds (default 1.0) between
50              iterations
51
52       -v, --verbose
53              always output headers giving file names
54
55       --help display this help and exit
56
57       --version
58              output version information and exit
59
60       If  the  first  character of K (the number of bytes or lines) is a `+',
61       print beginning with the Kth item from the start of each  file,  other‐
62       wise, print the last K items in the file.  K may have a multiplier suf‐
63       fix:  b  512,  kB  1000,  K  1024,  MB  1000*1000,  M   1024*1024,   GB
64       1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
65
66       With  --follow  (-f),  tail  defaults to following the file descriptor,
67       which means that even if a tail'ed file is renamed, tail will  continue
68       to  track  its  end.   This  default behavior is not desirable when you
69       really want to track the actual name of the file, not the file descrip‐
70       tor (e.g., log rotation).  Use --follow=name in that case.  That causes
71       tail to track the named file  in  a  way  that  accommodates  renaming,
72       removal and creation.
73

AUTHOR

75       Written  by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Mey‐
76       ering.
77

REPORTING BUGS

79       Report tail bugs to bug-coreutils@gnu.org
80       GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
81       General help using GNU software: <http://www.gnu.org/gethelp/>
82       Report tail translation bugs to <http://translationproject.org/team/>
83
85       Copyright © 2010 Free Software Foundation, Inc.   License  GPLv3+:  GNU
86       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
87       This  is  free  software:  you  are free to change and redistribute it.
88       There is NO WARRANTY, to the extent permitted by law.
89

SEE ALSO

91       The full documentation for tail is maintained as a Texinfo manual.   If
92       the  info  and  tail  programs are properly installed at your site, the
93       command
94
95              info coreutils 'tail invocation'
96
97       should give you access to the complete manual.
98
99
100
101GNU coreutils 8.5                November 2010                         TAIL(1)
Impressum