Tuesday, September 13, 2005

Deleting empty directories

FOund this to be hand, especially after iTunes (or similar) buggers up the filestructure of your mp3 colleciton...

find . -type d -empty -exec rmdir {} \;

or if you are a bit more cautious

find . -type d -empty -ok rmdir {} \;

Works in cygwin, might need some more escaping etc for other *nix's

No comments: