delete old logfiles

richard lucassen mailinglists at lucassen.org
Sat Mar 26 22:34:55 CET 2005


Debian Sarge nagios-txt 1.3

The log are rotated daily, but older logs are still kept in the
"archives" directory. Is there a Nagios-way to get rid of old logfiles
other than a daily cronjob starting

find /var/log/nagios/archives/ -mtime +${LOG_MAX_DAYS} -exec rm -f {} \;

to delete these older logfiles?

Richard.

-- 
___________________________________________________________________
Mac OS X proves that it's easier to make UNIX pretty than it is to
make Windows secure.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht                                        |
| Public key and email address:                                    |
| http://www.lucassen.org/mail-pubkey.html                         |
+------------------------------------------------------------------+


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list