Wednesday, February 20, 2008

useful tail command




When you're tailing a logfile on Linux with "tail -f", the system might rename the file with a cronjob, so for long running tail jobs, you can use the --retry and --follow=name options to instruct tail to keep checking to see if the file is still current:


tail --follow=name --retry -f xferlog messages secure