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 /var/log/daemon.log
file
Is there any way to fix this, so that tail
shows the contents of the new file, if the file was rotated ?