# Recursively delete files of one name in subfolders?



## michaelsanford (Nov 19, 2002)

At first I thought rm -r stood for -recursive ha!

Ideally, I'd like to remove ".FBCIndex" since I never use that index junk and don't want to clutter my filesystem with it.

Alternatively, it could also be used to remove .DS_Store and stuff for those Windows networkers out there.


----------



## michaelsanford (Nov 19, 2002)

Sorry maybe the last was unclear, I want to remove ALL the instances of .FBCIndex in my filesystem, recursively from /


----------



## anarchie (Nov 20, 2002)

Try this sucker:

find / -name .FBCIndex -exec rm '{}' ';'

I think I did something wrong, cause of all the quotes.  Someone got a better way?


----------



## michaelsanford (Nov 20, 2002)

Yeah that did it.
I tested it with a custom tree and file fist, and it seems to work.

Only thing: you have to sudo the whole thing so that it can look in folders like /Trash

Merçi anarchie!


----------



## michaelsanford (Nov 20, 2002)

I meant .Trashes not /Trash


----------

