Subject: Re: bug#25475: tail -f behaviour

From: Bernhard Voelker <[email-masked]>
Date: Wed, 18 Jan 2017 19:33:29 +0100

On 01/18/2017 05:39 PM, f0rhum wrote:
> Hi
> This is about tail v5.97

First of all, this is a ~10 years old version.
Even if this turns out to be a bug in the software, you won't get any support
for it.  Did you try the latest version (8.26)?

> 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.

To be honest, I do not understand what you mean by "pruning" in this
context, so I'm confused about what is going on.
Can you provide a simple example like:

  touch file
  tail -f file &
  sleep 2
  printf "some line\n" >> file
  sleep 2
  printf "only some words ..." >> file
  sleep 2
  printf "... on a continued line ..." >> file
  sleep 2
  printf "... which is now terminated\n" >> file
  sleep 2
  kill $!
  wait $!

Thanks & have a nice day,
Berny