log-rotation (Logrotate)

Logrotate command is used for performing log-rotation in Linux and is run as a cronjob. Logrotate command emails the logs to the administrator. Logrotate compresses the dated log archives and limits the total size of logs. The numbers in the file names are incremented by one every time a new logfile is created and this ‘rotates’ the files through the numbers.