cheatsheets devlog projects

logrotate-cheatsheet.md

Logrotate Cheatsheet

2022-09-24 1

/etc/logrotate.d/sample-log

/path/to/logs/*.txt {
    nocompress
    copytruncate
    dateext
    rotate 15
    size 250K
}

This will run on a cron. To manually run it you can do:

logrotate /etc/logrotate.d/sample-log

More information:

https://nivethan.dev/devlog/logrotate.html