Infos I didn't found that easily with Google and had to find out myself. Hereby given back to the net...
Follow file with tail until it gets removed...
Submitted by llando on Tue, 01/03/2012 - 15:23.
Instead of
tail -f /var/log/myserver.log
use
tail --follow=name /var/log/myserver.log
Using the long form --follow instead of -f you can tell tail to watch the file name and not the file descriptor. So shortly after the file name was removed tail will notice it and terminate itself.
Post new comment