Log Rotation

noun

say it: “LOG roh-TAY-shun” /ˈlɔɡ roʊˈteɪʃən/

Starting a fresh log file on a schedule and zipping, then deleting, the older ones, so logs never fill the disk.

What is log rotation?

Log rotation keeps logs from filling the disk. On a schedule, the current log is renamed with a .1, a fresh empty one takes its place, older copies are zipped, and the oldest are deleted. On Linux, the logrotate program does it.

ls /var/log | grep syslog
# syslog
# syslog.1
# syslog.2.gz
# syslog.3.gz

In a sentence

  • “Thanks to log rotation, last month's logs were zipped and next month they'll be gone.”
  • “syslog.1 and syslog.2.gz are left behind by log rotation.”

Level: Journeyman · More Operating System terms at this level

Updated