Thursday, 28 May 2009

How to delete empty directories?

It's easy to do with the help of bash which is part of every Linux system but also available for Windows in cygwin:

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

This solution also works with directory names including spaces.

No comments: