#Author : Abdul Wasiq
CDATE=`date +%d-%m-%Y`
{
echo " Count of archivelog file olderthan 3 days "
echo " ---------------------------------------------------------- "
/usr/bin/find /u02/oradata/db/archivelog/ -mtime +3 |wc -l
echo " "
echo " ----------------------------------------------------------- "
echo " List of 3 days old archivelog files "
echo " ----------------------------------------------------------- "
/usr/bin/find /u02/oradata/db/archivelog/ -mtime +3 -exec ls -lrth '{}' \;
echo " ----------------------------------------------------------- "
echo " Removing 3 days old archivelog files "
echo " ----------------------------------------------------------- "
/usr/bin/find /u02/oradata/db/archivelog/ -mtime +3 -exec rm -f '{}' \;
} > /backup/scripts/logs/arch_remove_$CDATE.log
echo "==================== Completed =================="
No comments:
Post a Comment