Why does `tail -F` not handle dead symlinks gracefully in Red Hat Enterprise Linux 6.4?
Issue
- The version of
tail
that is shipped with Red Hat Enterprise Linux 6.4 appears to be mishandling dead symlinks. tail -F
current-log printstail: cannot watch 'current-log': No such file or directory
under the following sequence:
1.
Open a terminal and run the following commands:
# touch mylog-1
# ln -s mylog-1 current-log
2.
In a separate terminal, execute:
# tail -F current-log
3.
Return to the first terminal and run these:
# echo content >> mylog-1;
# rm -f current-log
# ln -s mylog-2 current-log
#echo content >> mylog-2
tail -F
running in the second terminal prints the error whenln -s mylog-2 current-log
is executed and stops tracking current-log.- Why does
tail -F
not handle dead symlinks gracefully in Red Hat Enterprise Linux 6.4?
Environment
- Red Hat Enterprise Linux 6.4
- coreutils-8.4-19.el6.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.