Recursively deleting folders

While I was looking at my backup log in Retrospect, I saw an error message about a directory had more than 100 folders deep. What?

I took a look and sure enough, Entourage had gone on a folder making frenzy and had created well over 100 folders within each other:

My Project.rge/My Project.rge/My Project.rge/My Project.rge/My Project.rge…

Well, I fired up terminal.app, typed rm -R and expected my problem folder to go away. But it didn’t. The folders that Entourage created were actually bundles, so now I had to dig a little deeper:

find . -iname “*.rge” -exec rm -rdf {} \;

Basically, this calls the find command recursively on every bundle found with the “rge” extention and deletes it. So if anyone else out there has the need to recursively delete bundles/folders on their Mac OS computer, just type in the above command… with extreme caution 🙁 

Leave a Reply