Tip of the Day: Recursively Delete Empty Folders
Stuck with many nested folders, some of which may be empty? Use the following command to quickly find and delete the empty ones:
find . -empty -type d -delete
-empty
: File is empty and is either a regular file or a directory-type d
: directory-delete
: Delete files; true if removal succeeded.