tail

Name

tail -- output the last part of files

Description

The specification for "tail" is as specified in the SUS but with the following differences as listed below.

Differences

--retry

keep trying to open a file even if it is inaccessible when tail starts or if it becomes inaccessible later -- useful only with -f

--bytes=N

output the last N bytes

--follow

equivalent to the -f option

--lines=N

equivalent to the -n option

--max-unchanged-stats=N

When tailing a file by name, if there have been this many consecutive iterations for which the size has remained the same, then open/fstat the file to determine if that file name is still associated with the same device/inode-number pair as before.

--max-consecutive-size-changes=N

This option is meaningful only when following by name. Use it to control how long tail follows the descriptor of a file that continues growing at a rapid pace even after it is deleted or renamed. After detecting N consecutive size changes for a file, open/fstat the file to determine if that file name is still associated with the same device/inode-number pair as before.

--pid=PID

with -f, terminate after process ID, PID dies

-q, --quiet, --silent

never output headers giving file names

-s, --sleep-interval=S

with -f, sleep S seconds between iterations

-v, --verbose

always output headers giving file names

+NUMBER, -NUMBER

This option does not support the c or l suffixes as stated in the SUS. The suffixes b, k, m are supported instead which refer to multipliers 512, 1024 and 1048576 respectively.