aboutsummaryrefslogtreecommitdiff
path: root/man/man1/tail.html
blob: 781f33337da615ed5a9339993ab5067e7e1a07a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<head>
<title>tail(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>TAIL(1)</b><td align=right><b>TAIL(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    tail &ndash; deliver the last part of a file<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>tail</font></tt> [ <tt><font size=+1>+&#8722;</font></tt><i>number</i>[<tt><font size=+1>lbc</font></tt>][<tt><font size=+1>rf</font></tt>] ] [ <i>file</i> ] 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <tt><font size=+1>tail</font></tt> [ <tt><font size=+1>&#8722;fr</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>nlines</i> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>nbytes</i> ] [ <i>file</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Tail</i> copies the named file to the standard output beginning at
    a designated place. If no file is named, the standard input is
    copied. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Copying begins at position <tt><font size=+1>+</font></tt><i>number</i> measured from the beginning,
    or <tt><font size=+1>&#8722;</font></tt><i>number</i> from the end of the input. <i>Number</i> is counted in lines,
    1K blocks or bytes, according to the appended flag <tt><font size=+1>l</font></tt>, <tt><font size=+1>b</font></tt>, or <tt><font size=+1>c</font></tt>.
    Default is <tt><font size=+1>&#8722;10l</font></tt> (ten ell). 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The further flag <tt><font size=+1>r</font></tt> causes tail to print lines from the end of
    the file in reverse order; <tt><font size=+1>f</font></tt> (follow) causes <i>tail</i>, after printing
    to the end, to keep watch and print further data as it appears.
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The second syntax is that promulgated by POSIX, where the <i>numbers</i>
    rather than the options are signed.<br>
    
</table>
<p><font size=+1><b>EXAMPLES     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>tail file<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Print the last 10 lines of a file.<br>
        
    </table>
    <tt><font size=+1>tail +0f file<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Print a file, and continue to watch data accumulate as it grows.<br>
        
    </table>
    <tt><font size=+1>sed 10q file<br>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        Print the first 10 lines of a file.<br>
        
    </table>
    
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/tail.c<br>
    </font></tt>
</table>
<p><font size=+1><b>BUGS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    Tails relative to the end of the file are treasured up in a buffer,
    and thus are limited in length. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    According to custom, option <tt><font size=+1>+</font></tt><i>number</i> counts lines from 1, and counts
    blocks and bytes from 0. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Tail</i> is ignorant of UTF.<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>