Unix and Linux Discussions Tagged with tail |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
13,993 |
Homework & Coursework Questions |
|
|
|
9 |
3,267 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,407 |
Shell Programming and Scripting |
|
|
|
1 |
2,036 |
Shell Programming and Scripting |
|
|
|
2 |
3,851 |
Shell Programming and Scripting |
|
|
|
1 |
1,417 |
UNIX for Beginners Questions & Answers |
|
|
|
7 |
2,471 |
Shell Programming and Scripting |
|
|
|
7 |
6,776 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
1,732 |
Shell Programming and Scripting |
|
|
|
5 |
1,851 |
Shell Programming and Scripting |
|
|
|
10 |
3,590 |
Shell Programming and Scripting |
|
|
|
9 |
11,359 |
Shell Programming and Scripting |
|
|
|
1 |
1,950 |
Shell Programming and Scripting |
|
|
|
5 |
1,844 |
Shell Programming and Scripting |
|
|
|
0 |
4,811 |
Shell Programming and Scripting |
|
|
|
3 |
2,984 |
Shell Programming and Scripting |
|
|
|
11 |
8,183 |
Shell Programming and Scripting |
|
|
|
9 |
14,619 |
Shell Programming and Scripting |
|
|
|
1 |
90,021 |
Shell Programming and Scripting |
|
|
|
2 |
2,879 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
7,265 |
Shell Programming and Scripting |
|
|
|
3 |
3,823 |
Shell Programming and Scripting |
|
|
|
4 |
2,907 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
1,893 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
4,483 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
3,350 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
13,811 |
Shell Programming and Scripting |
|
|
|
4 |
4,527 |
Shell Programming and Scripting |
|
|
|
3 |
4,679 |
Shell Programming and Scripting |
|
|
|
7 |
4,870 |
Shell Programming and Scripting |
|
|
|
4 |
2,673 |
Shell Programming and Scripting |
|
|
|
4 |
2,552 |
UNIX for Dummies Questions & Answers |
|
|
|
7 |
80,811 |
Solaris |
|
|
|
3 |
3,112 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
6,382 |
Shell Programming and Scripting |
|
|
|
6 |
11,168 |
Shell Programming and Scripting |
|
|
|
3 |
5,689 |
UNIX for Dummies Questions & Answers |
|
|
|
10 |
6,510 |
Shell Programming and Scripting |
|
|
|
2 |
126,803 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,617 |
UNIX for Dummies Questions & Answers |
TAIL(1) General Commands Manual TAIL(1)
NAME
tail - deliver the last part of a file
SYNOPSIS
tail [ +-number[lbc][rf] ] [ file ]
tail [ -fr ] [ -n nlines ] [ -c ncharacters ] [ file ]
DESCRIPTION
Tail copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is copied.
Copying begins at position +number measured from the beginning, or -number from the end of the input. Number is counted in lines, 1K
blocks or characters, according to the appended flag or Default is -10l (ten ell).
The further flag causes tail to print lines from the end of the file in reverse order; (follow) causes tail, after printing to the end, to
keep watch and print further data as it appears.
The second syntax is that promulgated by POSIX, where the numbers rather than the options are signed.
EXAMPLES
tail file
Print the last 10 lines of a file.
tail +0f file
Print a file, and continue to watch data accumulate as it grows.
sed 10q file
Print the first 10 lines of a file.
SOURCE
/sys/src/cmd/tail.c
BUGS
Tails relative to the end of the file are treasured up in a buffer, and thus are limited in length.
According to custom, option +number counts lines from 1, and counts blocks and characters from 0.
TAIL(1)