Tuesday, February 28, 2012

find Not Working in cron

I'm getting the following error issuing a find in cron:

find: 0652-018 An expression term lacks a required parameter.

Here's my crontab entry:

0 23 * * * find /orafra/flash_recovery_area/exportArea -type f -mtime +6 -exec rm -f {} \;

After research and a lot of googling, I found out that cron is eating up some symbols, specifically the backslash "\" and the semicolon ";"

With that, here's my now working crontab entry:

0 23 * * * find /orafra/flash_recovery_area/exportArea -type f -mtime +6 -exec rm -f {} \\\;

No comments:

Post a Comment