GNU bug report logs - #25475
tail -f behaviour

Previous Next

Package: coreutils;

Reported by: f0rhum <f0rhum <at> free.fr>

Date: Wed, 18 Jan 2017 16:40:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 25475 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: f0rhum <f0rhum <at> free.fr>, 25475 <at> debbugs.gnu.org
Subject: Re: bug#25475: tail -f behaviour
Date: Wed, 18 Jan 2017 18:37:01 +0000
On 18/01/17 16:39, f0rhum wrote:
> Hi
> This is about tail v5.97
> I have a log file that is updated every 5mn, a timestamped message being
> appended to a new line at the end
> On the third time an indentical message would be writen, the last line
> is replaced by "..." then the message is writen
> 
> Tracking changes with tail -f stops after this, which may be intended
> behaviour as man states "as the file grows".
> 
> Although, when pruning a bunch of lines from the head of the file, then a
> yet running tracking still won't update even the file size grows, like if the file size was
> grabbed on the very beginning of the command and never updated on each
> iteration.
> 
> To be honest, I didn't try to see what happens if I prune a single line
> and see what the next 2nd and further iterations show.

I think you're saying that your file is truncated in place.
tail(1) doesn't handle that well and expects files to be increasing,
and maybe rotated (which is handled with -F).
Newer versions of tail(1) will show the whole file again once
it detects truncation (as usually a truncated file is truncated to nothing
before new data is written).

cheers,
Padraig





This bug report was last modified 6 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.