From: Jim Meyering Date: Wed, 30 Dec 2009 13:23:45 +0000 (+0100) Subject: doc: update tail's documentation to allow for new -F semantics X-Git-Tag: v8.3~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f428e548e52d76a5ed729a2cba9a05f93dad40d9;p=thirdparty%2Fcoreutils.git doc: update tail's documentation to allow for new -F semantics * src/tail.c (usage): Reword tail -F description, so that it no longer mentions details specific to the non-inotify implementation. Also, join diagnostic strings (while staying under the 509-byte limit) to ease formatting of translations. The latter was prompted by a report from Stéphane Raimbault. * doc/coreutils.texi (tail invocation): Update description here, too. --- diff --git a/THANKS b/THANKS index b5adaeb215..ce196a45eb 100644 --- a/THANKS +++ b/THANKS @@ -543,6 +543,7 @@ Solar Designer solar@owl.openwall.com Stanislav Ievlev inger@altlinux.ru Stavros Passas stabat@ics.forth.gr Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr +Stéphane Raimbault stephane.raimbault@makina-corpus.com Stephen Depooter sbdep@myrealbox.com Stephen Eglen eglen@pcg.wustl.edu Stephen Gildea gildea@stop.mail-abuse.org diff --git a/doc/coreutils.texi b/doc/coreutils.texi index e097c257d0..5e43b1705e 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -2770,8 +2770,10 @@ If you'd like to continue to track the end of a growing file even after it has been unlinked, use @option{--follow=descriptor}. This is the default behavior, but it is not useful if you're tracking a log file that may be rotated (removed or renamed, then reopened). In that case, use -@option{--follow=name} to track the named file by reopening it periodically -to see if it has been removed and recreated by some other program. +@option{--follow=name} to track the named file, perhaps by reopening it +periodically to see if it has been removed and recreated by some other program. +Note that the inotify-based implementation handles this case without +the need for any periodic reopening. No matter which method you use, if the tracked file is determined to have shrunk, @command{tail} prints a message saying the file has been truncated diff --git a/src/tail.c b/src/tail.c index 28a0e26a96..8195deedf6 100644 --- a/src/tail.c +++ b/src/tail.c @@ -316,14 +316,10 @@ GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\ fputs (_("\ With --follow (-f), tail defaults to following the file descriptor, which\n\ means that even if a tail'ed file is renamed, tail will continue to track\n\ -its end. \ -"), stdout); - fputs (_("\ -This default behavior is not desirable when you really want to\n\ +its end. This default behavior is not desirable when you really want to\n\ track the actual name of the file, not the file descriptor (e.g., log\n\ rotation). Use --follow=name in that case. That causes tail to track the\n\ -named file by reopening it periodically to see if it has been removed and\n\ -recreated by some other program.\n\ +named file in a way that accommodates renaming, removal and creation.\n\ "), stdout); emit_ancillary_info (); }