cron/shell/find problem

Hugh E Cruickshank hugh at forsoft.com
Tue May 4 17:55:04 UTC 2004


Good suggestion but no go. - HEC

From: p.novak Sent: May 4, 2004 06:48
> 
> try using the full path to the rm command. the cron environment is
> probably not the same 
> as your uid's.
> 
>From: Hugh E Cruickshank Sent: Monday, May 03, 2004 5:09 PM
> 
> Hi All:
> 
> I having a bit of a problem adding an entry to a crontab file. Actually
> the adding works fine, it is just the command will not work.
> 
> Here is what I have so far:
> 
> 1. The following command works correctly from the command line:
> 
>    /usr/bin/find /usr/faq/xpt -name "RCTTAX.*" -mtime +90 -exec rm {} \;
> 
> 2. When the command is added to a shell script file as above or
>    to a crontab file as:
> 
>    0 2 * * * /usr/bin/find /usr/faq/xpt -name "RCTTAX.*" -mtime +90
> -exec rm {} \;
> 
>    The execution fails with
> 
>    /usr/bin/find: missing argument to `-exec'
> 
> 3. I have been doing this for years on various different UNIX
>    systems without any problems.
> 
> Any thoughts of suggestions would be greatly appreciated.
> 
> Regards, Hugh





More information about the redhat-list mailing list