How to delete empty folders in addition to parent?
There is such a folder structure: /var/test/aaa/bbb/ccc
all folders including the test does not contain files
How to delete all empty folders in the test folder except the folder test?
find /var/test/ -type d-empty -delete
removes all folders, including the folder itself test
asked March 23rd 20 at 18:43
-mindepth 1 means process all files
except the starting-points
Find more questions by tags bashLinux