Recursively delete files of one name in subfolders?

michaelsanford

Translator, Web Developer
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.
 
Sorry maybe the last was unclear, I want to remove ALL the instances of .FBCIndex in my filesystem, recursively from /
 
Try this sucker:

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

I think I did something wrong, cause of all the quotes. Someone got a better way?
 
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!
 
Back
Top