This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
aix:logrotate [2022/10/10 11:53] manu |
aix:logrotate [2023/08/08 17:58] (current) manu |
||
|---|---|---|---|
| Line 110: | Line 110: | ||
| compressext .bz2 | compressext .bz2 | ||
| rotate 4 | rotate 4 | ||
| + | } | ||
| + | </cli> | ||
| + | |||
| + | ===== Delete a specific log file ===== | ||
| + | |||
| + | <cli prompt='$'> | ||
| + | $ cat /etc/logrotate.d/app | ||
| + | |||
| + | /var/log/app/*.old { | ||
| + | hourly | ||
| + | rotate 0 | ||
| + | firstaction | ||
| + | /usr/bin/find /var/log/app/ -name "*.old" -mtime +1 -delete | ||
| + | endscript | ||
| + | nocreate | ||
| + | missingok | ||
| + | notifempty | ||
| } | } | ||
| </cli> | </cli> | ||