Delete archived log files using logrotate
Hi All
I want to know , is it possible to delete archived log files using logrotate script. Suppose i don't want to keep /var/log/message beyond 1 day, will following will serve my purpose ? /var/log/message { daily rotate 0 } Thanks for your attention |
Hi,
From Quote:
Quote:
rotate 1 daily postrotate /sbin/killall -HUP syslogd endscript } Should do what you want. Bear in mind 1 day of /var/log/message is not enough. I recommend you keep the default. Take care, Tshimanga. |
If I recall correctly, the logrotate configuration file has an option for killing the files after a certain number of days.
As for me, I never do that. Disk space is cheap. |
All times are GMT -5. The time now is 09:33 PM. |