[SunHELP] Manipulate find

Marek Grinberg marek.grinberg at tele2.se
Mon Jan 23 03:36:25 CST 2006


The following command does not mail error message:

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

Hereby I would like to thank you that mailed me directly with all suggestions for all valuable help.

Regards,

Marek

Phil Stracchino wrote:
> 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)
>
>
>   



More information about the SunHELP mailing list