This question already has an answer here:
I have a script running continuously, reading
tail -f /var/log/daemon.log
The problem is, when the file
/var/log/daemon.log gets rotated by
logrotate, tail still has "file handle" for the old (rotated) file and no longer displays the contents of the new
Is there any way to fix this, so that
tail shows the contents of the new file, if the file was rotated ?