I want to
tail -f file but going tailing it after a
The tail manpage tells me:
--follow=descriptor so a
mv should not change the inode?
tail -f stop working after the rename?
tail sources, it appears that it does not fail at reading the renamed file, but it fails at monitoring the file status.
tail appears to behave this (simplified) way:
inotifywatch in order to be noticed when something happens to the file;
When you move the file,
tail, which in turn decides to drop the file from the list of the monitored files. It appears to be intentional, although it is not clear to me why this is so (and I would expect it to keep monitoring the file after rename). The relevant lines appear to be these.
So, the problem is not with the underlying Linux operating system, but with the way
tail handles file renaming.