tail follow file logrotate

Revision history
Tags: tail logrotate linux

On one of my servers I was running tail -f /var/log/nginx/error.log. But output would stop every so often since the file is rotated with logrotate, giving that path a new inode number.

So when I switched to tail -F, I no longer have to restart the tail process to make it follow the output again.

Documentation excerpt

-f --follow
    output appended data as the file grows
    same as --follow=name --retry
    keep trying to open a file if it is inaccessible


If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).

Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.