Monday, October 15, 2007

One Liner: Recursively Delete Empty Directories

Here's how to delete all empty directories recursively under some directory:

find <parent-dir> -depth -type d -empty -exec rmdir -v {} \;

This is one step away from deleting all your data, so please be careful.

2 comments: