GNU bug report logs -
#9266
tail -F does not follow through symlinks
Previous Next
Reported by: Bart Vanhaute <bart.vanhaute <at> gmail.com>
Date: Tue, 9 Aug 2011 15:42:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9266 in the body.
You can then email your comments to 9266 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#9266
; Package
coreutils
.
(Tue, 09 Aug 2011 15:42:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bart Vanhaute <bart.vanhaute <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 09 Aug 2011 15:42:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When I use tail -F to follow a file that is a symlink to another file,
and that second file gets replaced, tail no longer follows the new
file. I am not sure if this scenario is actually supported, but the
current behaviour is unexpected to me.
Detailed scenario to reproduce:
in one terminal:
$ ln -s f a
$ touch f
$ tail -F a
in another terminal:
$ mv f f.0
$ echo 'hello' > f
The output in terminal one will show
tail: `a' has become inaccessible: No such file or directory
but it will not show the 'hello' message.
I am using coreutils version 8.5 on debian sid (linux kernel version
3.0.0), but I noticed the same behaviour in coreutils version 8.9 on
opensuse (linux kernel version 2.6.37).
greetings,
Bart.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#9266
; Package
coreutils
.
(Tue, 09 Aug 2011 16:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 9266 <at> debbugs.gnu.org (full text, mbox):
Bart Vanhaute wrote:
> When I use tail -F to follow a file that is a symlink to another file,
> and that second file gets replaced, tail no longer follows the new
> file. I am not sure if this scenario is actually supported, but the
> current behaviour is unexpected to me.
>
> Detailed scenario to reproduce:
>
> in one terminal:
> $ ln -s f a
> $ touch f
> $ tail -F a
>
> in another terminal:
> $ mv f f.0
> $ echo 'hello' > f
>
> The output in terminal one will show
> tail: `a' has become inaccessible: No such file or directory
> but it will not show the 'hello' message.
>
> I am using coreutils version 8.5 on debian sid (linux kernel version
> 3.0.0), but I noticed the same behaviour in coreutils version 8.9 on
> opensuse (linux kernel version 2.6.37).
Thank you for the report.
That is indeed a difference in behavior from
the way tail works without inotify support.
If you want the old behavior (though there is no guarantee this
option will be around forever -- it's deliberately not documented),
use tail's ---disable-inotify option. Note the three leading '-'s.
Another work-around is to use readlink to give tail
an absolute name for the file:
tail -F "$(readlink -e a)"
Regarding tail's behavior change, we'll have to investigate
if/how to address it.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#9266
; Package
coreutils
.
(Tue, 30 Oct 2018 08:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 9266 <at> debbugs.gnu.org (full text, mbox):
tags 9266 notabug
close 9266
stop
(triaging old bugs)
On 2011-08-09 10:28 a.m., Jim Meyering wrote:
> Bart Vanhaute wrote:
>
>> When I use tail -F to follow a file that is a symlink to another file,
>> and that second file gets replaced, tail no longer follows the new
>> file. I am not sure if this scenario is actually supported, but the
>> current behaviour is unexpected to me.
> Thank you for the report.
> That is indeed a difference in behavior from
> the way tail works without inotify support.
>
> If you want the old behavior (though there is no guarantee this
> option will be around forever -- it's deliberately not documented),
> use tail's ---disable-inotify option. Note the three leading '-'s.
with no further comments in 7 years, I'm closing this bug.
-assaf
Added tag(s) notabug.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 30 Oct 2018 08:52:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
9266 <at> debbugs.gnu.org and Bart Vanhaute <bart.vanhaute <at> gmail.com>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 30 Oct 2018 08:52:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 27 Nov 2018 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 288 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.