//View Tip #496
» Moved Trac and Subversion repositories to another machine/direct
» Find and Grep
» Find files by mime-type
» Replace expr by other recursively
Similar Tips
» Directory Tree» Moved Trac and Subversion repositories to another machine/direct
» Find and Grep
» Find files by mime-type
» Replace expr by other recursively
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Remove all empty directories within the current directory
find . -type d -empty -exec rmdir {} \;
Or another way to do it: perl -MFile::Find -e"finddepth(sub{rmdir},'.')"

find . -type d -empty -delete