User Tools

Site Tools


aix:logrotate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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>​
aix/logrotate.1665395635.txt.gz · Last modified: 2022/10/10 11:53 by manu