coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] doc: describe how kernel inotify support affects tail -f


From: Jim Meyering
Subject: Re: [PATCH] doc: describe how kernel inotify support affects tail -f
Date: Tue, 24 May 2011 06:45:52 +0200

Pádraig Brady wrote:
>> Subject: [PATCH 1/2] doc: describe how kernel inotify support affects tail -f
>>
>> * doc/coreutils.texi (tail invocation) [-f]: Mention how inotify
>> kernel support makes a difference.
>> Prompted by http://bugzilla.redhat.com/662900
>> ---
>>  doc/coreutils.texi |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
>> index 289c0ba..dfaf4c9 100644
>> --- a/doc/coreutils.texi
>> +++ b/doc/coreutils.texi
>> @@ -2830,6 +2830,11 @@ tail invocation
>>  Likewise, the @option{-f} option has no effect for any
>>  operand specified as @samp{-}, when standard input is a FIFO or a pipe.
>>
>> +With kernel inotify support, output is asynchronous and generally very 
>> prompt.
>
> That's a little ambiguous to me.
> Inotify is async wrt time but sync wrt data change.
> How about:
>
> "With kernel inotify support, output is triggered by file changes
> and generally very prompt."
>
>> +Otherwise, @command{tail} sleeps for one second between checks---
>> +use @option{--sleep-interval=@var{N}} to change that default---which can
>> +make the output appear slightly less responsive or bursty.
>
> One can also specify sub second intervals:
> I've had this alias for years: alias tail='tail -s.1'

Thanks for the feedback.
How about this?

>From 8b5e05bd01774bcb04f7c47646e00b65a00a25ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Tue, 24 May 2011 06:44:24 +0200
Subject: [PATCH] doc: improve tail -f vs. inotify description and advice

* doc/coreutils.texi (tail invocation): Adjust, and add an example.
---
 doc/coreutils.texi |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index fa7e015..869ec8b 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -2830,10 +2830,17 @@ tail invocation
 Likewise, the @option{-f} option has no effect for any
 operand specified as @samp{-}, when standard input is a FIFO or a pipe.

-With kernel inotify support, output is asynchronous and generally very prompt.
+With kernel inotify support, output is triggered by file changes
+and generally very prompt.
 Otherwise, @command{tail} sleeps for one second between checks---
 use @option{--sleep-interval=@var{n}} to change that default---which can
 make the output appear slightly less responsive or bursty.
+When using tail without inotify support, you can make it more responsive
+by using a sub-second sleep interval, e.g., via an alias like this:
+
+@example
+alias tail='tail -s.1'
+@end example

 @item -F
 @opindex -F
--
1.7.5.2.1.g56b30



reply via email to

[Prev in Thread] Current Thread [Next in Thread]