- The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.
By default, logrotate's rotation consists of renaming existing log files with a numerical suffix, then recreating the original empty log file. For example, Template:Filename is renamed Template:Filename. If Template:Filename already exists from a previous rotation, it is first renamed Template:Filename. (The number of backlogs to keep can be configured.)
Template:Package Official is available in [core] and is installed as a member of the base group.
# pacman -S logrotate