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).  With
37              inotify, this option is rarely useful.
38
39       --pid=PID
40              with -f, terminate after process ID, PID dies
41
42       -q, --quiet, --silent
43              never output headers giving file names
44
45       --retry
46              keep trying to open a file even when it is or becomes inaccessi‐
47              ble; useful when following by name, i.e., with --follow=name
48
49       -s, --sleep-interval=N
50              with -f, sleep for approximately N seconds (default 1.0) between
51              iterations.
52
53              With inotify and --pid=P, check process P at least once every  N
54              seconds.
55
56       -v, --verbose
57              always output headers giving file names
58
59       --help display this help and exit
60
61       --version
62              output version information and exit
63
64       If  the  first  character of K (the number of bytes or lines) is a `+',
65       print beginning with the Kth item from the start of each  file,  other‐
66       wise, print the last K items in the file.  K may have a multiplier suf‐
67       fix:  b  512,  kB  1000,  K  1024,  MB  1000*1000,  M   1024*1024,   GB
68       1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
69
70       With  --follow  (-f),  tail  defaults to following the file descriptor,
71       which means that even if a tail'ed file is renamed, tail will  continue
72       to  track  its  end.   This  default behavior is not desirable when you
73       really want to track the actual name of the file, not the file descrip‐
74       tor (e.g., log rotation).  Use --follow=name in that case.  That causes
75       tail to track the named file  in  a  way  that  accommodates  renaming,
76       removal and creation.
77

AUTHOR

79       Written  by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Mey‐
80       ering.
81

REPORTING BUGS

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

SEE ALSO

95       The full documentation for tail is maintained as a Texinfo manual.   If
96       the  info  and  tail  programs are properly installed at your site, the
97       command
98
99              info coreutils 'tail invocation'
100
101       should give you access to the complete manual.
102
103
104
105GNU coreutils 8.4                  June 2018                           TAIL(1)
Impressum