Why does `tail -F` not handle dead symlinks gracefully in Red Hat Enterprise Linux 6.4?
Issue
- The version of
tailthat is shipped with Red Hat Enterprise Linux 6.4 appears to be mishandling dead symlinks. tail -Fcurrent-log printstail: cannot watch 'current-log': No such file or directoryunder 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 -Frunning in the second terminal prints the error whenln -s mylog-2 current-logis executed and stops tracking current-log.- Why does
tail -Fnot 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
