1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-31 18:44:38 +03:00

*** empty log message ***

This commit is contained in:
Jim Meyering
1999-01-09 21:20:02 +00:00
parent a9583f3841
commit 37f6675617

View File

@@ -1392,16 +1392,47 @@ Output the last @var{bytes} bytes, instead of final lines. Appending
by 1048576.
@item -f
@itemx --follow
@itemx --follow[=@var{how}]
@opindex -f
@opindex --follow
@cindex growing files
@vindex name @r{follow option}
@vindex descriptor @r{follow option}
Loop forever trying to read more characters at the end of the file,
presumably because the file is growing. Ignored if reading from a pipe.
presumably because the file is growing. This option is ignored when
reading from a pipe.
If more than one file is given, @code{tail} prints a header whenever it
gets output from a different file, to indicate which file that output is
from.
There are two ways to specify how you'd like to track files with this option,
but that difference is noticeable only when a followed file is removed.
If you'd like to continue to track the end of a growing file even after
it has been unlinked, use @samp{--follow=descriptor}. This is the default
behavior, but it is not useful if you're tracking a log file that may be
rotated (removed and reopened). In that case, use @samp{--follow=name} to
track the named file by reopening it periodically
@c FIXME: cross reference to the new option name
to see if it has been removed and recreated by some other program.
No matter which method you use, if the tracked file is determined to have
shrunk, @code{tail} prints a message saying the file has been truncated
and resumes tracking the end of the file from the newly-determined endpoint.
When a file is removed, @code{tail}'s behavior depends on whether it is
following the name or the descriptor. When following by name, tail can
detect that a file has been removed and gives a message to that effect,
and if @samp{--allow-missing} has been specified it will continue checking
periodically to see if the file reappears.
When following a descriptor, tail does not detect that the file has
been unlinked and issues no message.
The option values @samp{descriptor} and @samp{name} may be specified only
with the long form of the option, not with @samp{-f}.
@c FIXME-describe --allow-missing [useful only with --follow]
@c FIXME-describe --sleep-interval [useful only with --follow]
@itemx -n @var{n}
@itemx --lines=@var{n}
@opindex -n
@@ -2298,6 +2329,16 @@ Ignore differences in case when comparing lines.
@cindex duplicate lines, outputting
Print only duplicate lines.
@item -D
@itemx --all-repeated
@opindex -D
@opindex --all-repeated
@cindex all duplicate lines, outputting
Print all duplicate lines and only duplicate lines.
This option is useful mainly in conjunction with other options e.g.,
to ignore case or to compare only selected fields.
@c FIXME: give an example showing *how* it's useful
@item -u
@itemx --unique
@opindex -u