Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .TH TAIL 1L \" -*- nroff -*- |
2 | .SH NAME | |
3 | tail \- output the last part of files | |
4 | .SH SYNOPSIS | |
5 | .B tail | |
6 | [\-c [+]N[bkm]] [\-n [+]N] [\-fqv] [\-\-bytes=[+]N[bkm]] [\-\-lines=[+]N] | |
7 | [\-\-follow] [\-\-quiet] [\-\-silent] [\-\-verbose] [file...] | |
8 | ||
9 | .B tail | |
10 | [{\-,+}Nbcfklmqv] [file...] | |
11 | .SH DESCRIPTION | |
12 | This manual page | |
13 | documents the GNU version of | |
14 | .BR tail . | |
15 | .B tail | |
16 | prints the last part (10 lines by default) of each given file; it | |
17 | reads from standard input if no files are given or when a filename of | |
18 | `\-' is encountered. If more than one file is given, it prints a | |
19 | header consisting of the file's name enclosed in `==>' and `<==' | |
20 | before the output for each file. | |
21 | .PP | |
22 | The GNU | |
23 | .B tail | |
24 | can output any amount of data, unlike the Unix version, which uses a | |
25 | fixed size buffer. It has no | |
26 | .I \-r | |
27 | option (print in reverse). Reversing a file is really a different job | |
28 | from printing the end of a file; the BSD | |
29 | .B tail | |
30 | can only reverse files that are at most as large as its buffer, which | |
31 | is typically 32k. A reliable and more versatile way to reverse files is | |
32 | the GNU | |
33 | .B tac | |
34 | command. | |
35 | .SS OPTIONS | |
36 | .PP | |
37 | .B tail | |
38 | accepts two option formats: the new one, in which numbers are | |
39 | arguments to the option letters, and the old one, in which a `+' or | |
40 | `\-' and optional number precede any option letters. | |
41 | .PP | |
42 | If a number (`N') starts with a `+', | |
43 | .B tail | |
44 | begins printing with the Nth item from the start of each file, instead | |
45 | of from the end. | |
46 | .TP | |
47 | .I "\-c N, \-\-bytes N" | |
48 | Tail by N bytes. N is a nonzero integer, optionally followed by one | |
49 | of the following characters to specify a different unit. | |
50 | .RS | |
51 | .IP b | |
52 | 512-byte blocks. | |
53 | .IP k | |
54 | 1-kilobyte blocks. | |
55 | .IP m | |
56 | 1-megabyte blocks. | |
57 | .RE | |
58 | .TP | |
59 | .I "\-f, \-\-follow" | |
60 | Loop forever trying to read more characters at the end of the file, on | |
61 | the assumption that the file is growing. Ignored if reading from a | |
62 | pipe. Cannot be used if more than one file is given. | |
63 | .TP | |
64 | .I "\-l, \-n N, \-\-lines N" | |
65 | Tail by N lines. | |
66 | .TP | |
67 | .I "\-q, \-\-quiet, \-\-silent" | |
68 | Never print filename headers. | |
69 | .TP | |
70 | .I "\-v, \-\-verbose" | |
71 | Always print filename headers. | |
72 | .PP | |
73 | The long-named options can be introduced with `+' as well as `\-\-', | |
74 | for compatibility with previous releases. Eventually support for `+' | |
75 | will be removed, because it is incompatible with the POSIX.2 standard. |