grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

logrotate.md (441B)


      1 # logrotate
      2 
      3 [guide and functions][]
      4 
      5 ## file example
      6 ```
      7 /var/log/example.log {
      8         weekly
      9         size 500M
     10         missingok
     11         rotate 5
     12         compress
     13         copytruncate
     14         notifempty
     15 }
     16 ```
     17 
     18 test using debug mode
     19 ```
     20 logrotate -d /etc/logrotate.d/example
     21 ```
     22 
     23 run manually
     24 ```
     25 logrotate -f /etc/logrotate.d/example
     26 ```
     27 
     28 [guide and functions]: https://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/