On 23/05/11 18:31, Jim Meyering wrote:
> While "inotify" is specific to the linux kernel, it is
> widespread enough that it's worth mentioning some of the effect
> it has on tail -f:
>
>>From acbfebeb8d22a87b76fae32d8d9bf0473e178fdf Mon Sep 17 00:00:00 2001
> From: Jim Meyering <[email protected]>
> Date: Mon, 23 May 2011 16:09:42 +0200
> 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'
cheers,
Pádraig