Bash How To Find and Delete Empty Directories

Useful bash snippet to find empty directories
find ROOTDIRECTORY -depth -empty -type d

Useful bash snippet to find empty directories AND delete them!
find ROOTDIRECTORY -depth -empty -type d -delete

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.