Pete Turnbull wrote:
The correct way to do someting like this in a cron
entry is to check the
return code from the cd command, and only execute the rest of the command
if the cd succeeds, eg
(cd /usr/preserve && find . -mtime +7 -a -exec rm -f {} \;)
Hm. I'm not a Unix guru, so it's well possible I'm missing something
here. Perhaps you can enlighten me.
Why don't you just
find /usr/preserve -mtime +7 -a -exec rm -f {} \;
- is it just because you wouldn't have the ;) at the end of the line
then? ;-)
(With "my" VMS, I'd do a DEL/BEF="-7-" tempdisk:[tempdir...]*.*.*
- and
the above find appears to me like the proper translation.)
--
Andreas Freiherr
Vishay Semiconductor GmbH, Heilbronn, Germany
http://www.vishay.com