Difference between revisions of "Limit the size of .log files & the journal"
From Manjaro
Views
Actions
Namespaces
Variants
Tools
imported>Handy |
imported>Handy |
||
Line 53: | Line 53: | ||
== Some uses for Logrotate == | == Some uses for Logrotate == | ||
For example, if we wanted to rotate | For example, if we wanted to rotate all of the .log files in our /var/log/ directory (some .log files will not be affected by this command) on a daily basis; keep it for 7 days before it is deleted (meaning there would be 7 separate log files for the week); compress the file but do it on the next cycle; do it in a fashion where the original contents of the file is copied before the original file's contents is deleted; do nothing if the file is empty; if the file is missing don't give an error; we should be able to do that with the following: | ||