Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
1 root 1
#!/bin/sh
64 franck 2
# $Id: alcasar-log-clean.sh 64 2010-04-08 20:01:24Z franck $
1 root 3
# script de nettoyage des archives supérieures à 1 an ( 365 jours)
4
 
5
DATE=`date +%F`
6
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/"
7
delay=365
8
 
9
for i in $REP
10
do
11
	find $i -mtime +$delay -name '*.gz' -exec rm -f {} \;
12
	find $i -mtime +$delay -name '*.sql' -exec rm -f {} \;
13
done
14
 
15
exit 0