minix/man/man1/tail.1
2012-03-31 23:47:03 +02:00

48 lines
972 B
Groff

.TH TAIL 1
.SH NAME
tail \- print the last few lines of a file
.SH SYNOPSIS
\fBtail\fR [\fB\-c \fIn\fR] [\fB\-f] [\fB\-n \fIn\fR] [\fIfile\fR] ...\fR
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH OPTIONS
.TP 5
.B \-c
# The count refers to characters
.TP 5
.B \-f
# On FIFO or special file, keep reading after EOF
.TP 5
.B \-n
# The count refers to lines
.SH EXAMPLES
.TP 20
.B tail \-n 6
# Print last 6 lines of \fIstdin\fR
.TP 20
.B tail \-c 20 file
# Print the last 20 characters of \fIfile\fR
.TP 20
.B tail \-n 1 file1 file2
# Print last line of two files
.TP 20
.B tail \-n +8 file
# Print the tail starting with line 8
.SH DESCRIPTION
.PP
The last few lines of one or more files are printed.
The default count is 10 lines.
The default file is \fIstdin\fR.
If the value of \fIn\fR for the \fB\-c\fR or \fB\-n\fR flags starts with
a + sign, counting starts at the beginning, rather than the end of the file.
.SH "SEE ALSO"
.BR head (1).