[LBo] how do I recursive delete a file based on pattern match?

Billy Pollifrone billy at silverbaseball.com
Tue Apr 3 19:28:41 CEST 2007


Andrew Henry wrote:
> Billy Pollifrone wrote:
>>
>> find -name "ZbThumbnail.*" -exec rm {} ;
>>
>>   =

> Much obliged for the tip Billy, but I still have problems.  I realise tha=
t this =

> is probably the right way to do it, but something is not behaving and I g=
et =

> errors.  Do you know what the problem could be?
> =

> andrew at everest:~/Photos$ find -name "ZbThumbnail.info" -exec rm {} ;
> find: missing argument to `-exec'
> =


Sounds like the shell is messing with the parameters. Do this:

find -name "ZbThumbnail.*" -exec "rm {}" \;

Hope this helps.

-- =

  _        ____                                       __
 / \     .'    '.        ____......------""""""""`````  `\
|   `::-/'-....-'\--""```      Billy Pollifrone           |
|   ,:'-\.-''''-./--..___    billy AT silverbaseball.com /
 \_/     '.____.'        ````````````"""""""------------'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://linuxbasics.org/pipermail/qna/attachments/20070403/9f3d934b/si=
gnature.pgp


More information about the QnA mailing list