[SunHELP] Manipulate find

Phil Stracchino phil.stracchino at speakeasy.net
Fri Jan 20 07:04:51 CST 2006


Marek Grinberg wrote:
> Hello,
> 
> The following entry in crontab:
> find /export/home/neat/neat* -mtime +90 -exec rm -f {} \;
> yields the following message in mail:
> Your "cron" job on rissna
> find /export/home/neat/neat* -mtime +90 -exec rm -f {} \;
> produced the following output:
> find: cannot open /export/home/neat/neatex*: No such file or directory
> 
> Is it possible to modify the find above, so no mail is generated ?


Yes, the same way you'd prevent mail output from any other crontab
command, or discard output from any other command:

find /export/home/neat/neat* -mtime +90 -exec rm -f {} \; >/dev/null 2>&1


(should be one line)


-- 
 Phil Stracchino       phil.stracchino at speakeasy.net
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518



More information about the SunHELP mailing list