summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-09 21:20:02 +0000
committerJim Meyering <jim@meyering.net>1999-01-09 21:20:02 +0000
commit37f6675617dbb68c48517466d151bd100ae8bcdb (patch)
tree57ad96e5b5c385ebccf5c8d230eee5e0d40b5469 /doc
parenta9583f3841bdad671db6da923c552b2602d12ea0 (diff)
downloadcoreutils-37f6675617dbb68c48517466d151bd100ae8bcdb.tar.xz
*** empty log message ***
Diffstat (limited to 'doc')
-rw-r--r--doc/textutils.texi45
1 files changed, 43 insertions, 2 deletions
diff --git a/doc/textutils.texi b/doc/textutils.texi
index c19c3b276..dbb8393ac 100644
--- a/doc/textutils.texi
+++ b/doc/textutils.texi
@@ -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