Rev 518 | Blame | Last modification | View Log
#!/bin/sh
# $Id: alcasar-log-clean.sh 519 2011-03-25 16:30:32Z stephane $
# 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