The Uppercase tail -F Difference

A quick blog post today about a super useful feature that must have been in the Linux ‘tail’ command for ages of which I only recently became aware: The upper case -F option.

Those of you who administrate Linux systems will probably do a lot of tail -f’s to keep an eye on log files of different programs. The problem that sometimes arises is that the log rotator renames the current file and creates a new one. The tail command with the ‘-f’ (lowercase) option, however, keeps following the old file that was renamed. In other words, it’s not following the current log output anymore.

As it turns out there is a simple solution for this. Replace the ‘-f’ parameter with ‘-F’ (uppercase) for tail to keep an eye on the filename and to automatically switch to the new log file!