[LBo] how do I recursive delete a file based on pattern match?
Billy Pollifrone
billy at silverbaseball.com
Tue Apr 3 13:11:48 CEST 2007
Andrew Henry wrote:
> Brain not working today...
> =
> I know how to recursive delete a directory with 'rm -r' but the same
> does not work when deleting a specific file pattern in multiple
> sub-directories, eg.
> =
> rm -r ZbThumbnail.*
> =
> It just tries to delete from current directory.
> =
> In Windows this is dead easy with del /s ZbThumbnail.* but I seem to
> remember that you need to use a bash script to accomplish the same in Lin=
ux.
> =
> Does anyone know of an easy way to do this or where I can find such a
> bash script?
> =
> --andrew
> =
> =
find -name "ZbThumbnail.*" -exec rm {} ;
-- =
_ ____ __
/ \ .' '. ____......------""""""""````` `\
| `::-/'-....-'\--""``` 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/3ff52ab3/si=
gnature.pgp
More information about the QnA
mailing list