//View Tip #496
» Clean out executable files
» Remove DS_Store files from shared folders
» List only the files that have been updated today.
» Remove empty directories
Similar Tips
» Duplicate directory tree» Clean out executable files
» Remove DS_Store files from shared folders
» List only the files that have been updated today.
» Remove empty directories
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