Wednesday, February 27, 2013

Clean up old backup files.


For clean up old backup files.

cat  /backup/backup_forcleanup.sh

#find /backup/scripts -type d -mtime +10 -name "2009*" -exec rm -rf {} \;
find /backup/scripts/201* -type d -mtime +10 -exec rm -rf {} \;

mail -s "Daily Report for `hostname`"  shrikant.lokhande@example.in < /home/shrikant/daily_report/D_Report_$(date +\%d\%b\%y-\%H%M).txt


mail -s "Hourly Check Result of `hostname` " shrikant.lokhande@example.in < /home/shrikant/daily_logs/oraprod_$(date +\%d\%b\%y-\%H\%M).txt


mail -s "Syslog check of `hostname`"    shrikant.lokhande@example.in <  /home/shrikant/chksyslog/oraprod1_$(date +\%d\%b\%y-\%H\%M)