I am running this script below as a cron job for user root. In fact I set this job early last week and expected it to delete archive logs older than 7 days, but doesn't work - just displays the echo messages and no error. Can somebody advise me the probable causes ??
DAY_AFTER=7; export DAY_AFTER
DELETE_FROM_DIR=/u05/oracle/oradata/TOLL2/archlog; export DELETE_FROM_DIR
date
echo '~~''
echo 'About to delete archive logs...'
echo '
find $DELETE_FROM_DIR -name "*.*" -mtime +$DAY_AFTER -exec rm {} \;
echo '~~''
echo 'Process Complete.'
echo '
date