Ultrix' /etc/crontab as a time-bomb [short joke].

From: Andreas Freiherr <Andreas.Freiherr_at_Vishay.com>
Date: Thu Mar 21 04:47:33 2002

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
Received on Thu Mar 21 2002 - 04:47:33 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:12 BST