Subversion Repositories ALCASAR

Rev

Rev 40 | Blame | Last modification | View Log

#!/bin/sh
# $Id: alcasar-log-clean.sh 64 2010-04-08 20:01:24Z franck $
# script de nettoyage des archives supérieures à 1 an ( 365 jours)

DATE=`date +%F`
REP="/var/log/squid/ /var/log/httpd/ /var/log/firewall/ /var/Save/base/ /var/Save/logs/firewall/ /var/Save/logs/squid/ /var/Save/logs/httpd/"
delay=365

for i in $REP
do
        find $i -mtime +$delay -name '*.gz' -exec rm -f {} \;
        find $i -mtime +$delay -name '*.sql' -exec rm -f {} \;
done

exit 0