summaryrefslogtreecommitdiffstats
path: root/abs/core/rsyslog/log_care.sh
blob: 4337828a5c84ea04cd69a26d54e522442f223fe8 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash
. /etc/profile
DATE=`date +%Y`
echo "compressing log files"
find /var/log/$DATE* -mtime  +1 -exec gzip -9 {} \;
echo "Deleting older log files"
find /var/log/$DATE*  -mtime +7  -exec rm -rf {} \;