1TAIL(1) User Commands TAIL(1)
2
3
4
6 tail - output the last part of files
7
9 tail [OPTION]... [FILE]...
10
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; or use -c +K to output bytes starting
21 with the Kth of each file
22
23 -f, --follow[={name|descriptor}]
24 output appended data as the file grows;
25
26 an absent option argument means 'descriptor'
27
28 -F same as --follow=name --retry
29
30 -n, --lines=K
31 output the last K lines, instead of the last 10; or use -n +K to
32 output starting with the Kth
33
34 --max-unchanged-stats=N
35 with --follow=name, reopen a FILE which has not
36
37 changed size after N (default 5) iterations to see if it has
38 been unlinked or renamed (this is the usual case of rotated log
39 files); with inotify, this option is rarely useful
40
41 --pid=PID
42 with -f, terminate after process ID, PID dies
43
44 -q, --quiet, --silent
45 never output headers giving file names
46
47 --retry
48 keep trying to open a file if it is inaccessible
49
50 -s, --sleep-interval=N
51 with -f, sleep for approximately N seconds (default 1.0) between
52 iterations; with inotify and --pid=P, check process P at least
53 once every N seconds
54
55 -v, --verbose
56 always output headers giving file names
57
58 --help display this help and exit
59
60 --version
61 output version information and exit
62
63 If the first character of K (the number of bytes or lines) is a '+',
64 print beginning with the Kth item from the start of each file, other‐
65 wise, print the last K items in the file. K may have a multiplier suf‐
66 fix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB
67 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
68
69 With --follow (-f), tail defaults to following the file descriptor,
70 which means that even if a tail'ed file is renamed, tail will continue
71 to track its end. This default behavior is not desirable when you
72 really want to track the actual name of the file, not the file descrip‐
73 tor (e.g., log rotation). Use --follow=name in that case. That causes
74 tail to track the named file in a way that accommodates renaming,
75 removal and creation.
76
77 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
78 Report tail translation bugs to <http://translationproject.org/team/>
79
81 Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Mey‐
82 ering.
83
85 Copyright © 2013 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
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.22 October 2018 TAIL(1)