System administration command. Manipulate logfiles according to commands given in config_files.
Debug mode. No changes will be made to logfiles.
Force rotation of logfiles.
Use the specified command to mail logfiles. The default command is /bin/mail -s.
Save state information in file. The default is /var/lib/logrotate.status.
Show syntax and options.
Describe what is being done and what logfiles are affected.
Logrotate directives may appear on their own or as part of logfile definitions—instructions for specific logfiles. You may use wildcards to specify those files. Enclose directives for logfile definitions in a beginning and ending curly brace. For example:
Compress old versions of logfiles with gzip.
Use command to compress logfiles. Default is gzip.
Append filename extension to compressed files instead of the compress command's default.
Specify options to pass to the compress command. Default for gzip is -9 for maximum compression.
Copy logfile, but do not change the original.
Copy logfile, then truncate it in place. For use with programs whose logging cannot be temporarily halted.
create [permissions] [owner] [group]
After rotation, re-create logfile with the specified permissions, owner, and group. permissions must be in octal. If any of these parameters is missing, the logfile's original attributes will be used.
Rotate logfiles every day.
Don't compress logfile until the next rotation.
End a postrotate or prerotate script.
Give rotated logfiles the specified extension. Any compression extension will be appended to this.
May only be used as part of a logfile definition. Begin a shell script to execute once if any files match. The script ends when the endscript directive is read.
Rotate logfile even if it is empty. Overrides the default notifempty option.
Read the file into current file. If file is a directory, read all files in that directory into the current file.
May only be used as part of a logfile definition. Begin a shell script to execute once after rotating all matching files and running any postrotate script. The script ends when the endscript directive is read.
Mail any deleted logs to address.
When using the mail command, mail the newly rotated log instead of the one being deleted.
When using the mail command, mail the log that is about to expire. This is the default behavior.
Skip missing logfiles. Do not generate an error.
Rotate logfiles only the first time logrotate is run in a month.
Override sharedscripts. Run prerotate and postrotate scripts for each log rotated. This is the default.
Move logs into directory for rotation. directory must be on the same physical device as the original logfiles.
May only be used as part of a logfile definition. Begin a shell script to apply after the logfile is rotated. The script ends when the endscript directive is read.
May only be used as part of a logfile definition. Begin a shell script to apply before a logfile is rotated. The script ends when the endscript directive is read.
The number of times to rotate a logfile before removing it.
Rotate logfile when it is greater than n bytes. n can optionally be followed by k for kilobytes or M for megabytes.
Run prescript and postscript only once for the session.
Use n as the starting number for rotated logs. Default is 0.
tabooext [+] extlist
Replace taboo extension list with the given extlist. If + is specified, add to existing list. The default list is .rpmorig .rpmsave ,v .swp .rpmnew ~.
Rotate logfiles if more than a week has passed since their last rotation.
Use command to uncompress logfiles. Default is gunzip.