]> pd.if.org Git - pdutils/blob - utils/tail/tail.1
implemented pwd
[pdutils] / utils / tail / tail.1
1 .TH TAIL 1 "2008-1.01" "pdcore utilities" "User Commands"
2 .SH NAME
3 tail \- copy the last part of a file
4 .SH SYNOPSIS
5 .B tail
6 [-f] [-c number | -n number] [file]
7 .SH DESCRIPTION
8 Copy the input file to standard output, starting from a specified location.
9 .SH OPTIONS
10 .TP
11 -f
12 Follow the file; keep updating tail's output as the input file grows. Note that
13 this option is only available for regular files and FIFOs that are named as
14 the 'file' operand, and will be ignored for other inputs (such as unnamed
15 pipes).
16 .TP
17 -c number
18 Byte offset of the input file at which output will commence.
19 .TP
20 -n number
21 Line offset of the input file at which output will commence.
22 .P
23 Byte and line offsets commence at the value 1. If 'number' includes a
24 leading '+', the offset is from the start of the input file. If 'number'
25 includes a leading '-' or has no prefix, it indicates that the desired
26 offset is backwards from the end of the input file.
27 .P
28 For example, '-n +3' will output the contents of the input file commencing from
29 the third line; '-c 20' or '-c -20' starts output twenty bytes prior to the end
30 of the input file.
31 .P
32 For byte offsets, a 'number' value of zero is not permitted. For line offsets,
33 the POSIX standard states that the option '-n 0' is valid, but outputs nothing,
34 whilst '-n +0' is invalid.
35 .P
36 Options '-c' and '-n' are mutually exclusive. If neither is specified,
37 the default behaviour of tail is to output the last ten lines of the input
38 file, as if it had been invoked with the option '-n 10'.
39 .SH OPERANDS
40 .TP
41 file
42 Input file. If none provided, or the filename '-' is passed to tail,
43 standard input will be used.
44 .SH "AUTHORITATIVE DOCUMENTATION"
45 <http://www.opengroup.org/onlinepubs/9699919799/utilities/tail.html>
46 .SH VERSION AND COMPLIANCE
47 Utility version 1.01
48 .P
49 Functional compliance with POSIX:2008 (IEEE Std 1003.1-2008;
50 Shell and Utilities, Base Specifications Issue 7).
51 .SH UNLICENSE
52 This is free and unencumbered software released into the public domain,
53 provided "as is", without warranty of any kind, express or implied. See the
54 file UNLICENSE and the website <http://unlicense.org> for further details.