Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] correct form of find - exec rm on RH5.2?


This one time, at band camp, Matthew Hannigan wrote:
>On Wed, Apr 12, 2006 at 06:19:21PM +1000, Jamie Wilkinson wrote:
>> This one time, at band camp, Terry Collins wrote:
>> >Can anyone tell me what is the correct form of
>> >
>> >find smtpd* -atime 7 -exec ` rm -f {} ` \;
>> >on a RH5.2 system?
>> 
>> You can only specify one directory to look in, so smtpd* isn't going to
>> work.
>
>not true -- do as many as you like

Ok, woops!

>> find . -wholename './smtpd*' -atime 7 -exec rm -f {} \;
>> 
>> or
>> 
>> find . -wholename './smtpd*' -atime 7 -print0 | xargs -0 rm -f
>> 
>> I only just learnt -wholename so I may have gotten the syntax wrong.  Buyer
>> beware! :-)
>
>I suspect older find's don't have -wholename.

"buyer beware".