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