Search code examples
linuxsyslog

How to use tail with syslog file wrap-around?


Upon certain conditions /var/log/syslog file is saved to /var/log/syslog.0 and a new empty /var/log/syslog is created to serve the system.

The problem is - if tail -f /var/log/syslog runs during the above switch, then tail stops showing anything because of the syslog file switch.

Is there any solution?


Solution

  • You can use the -F option to get the behavior you desire. For example: tail -F /var/log/syslog