Answer the question
In order to leave comments, you need to log in
How to delete empty folders other than the parent?
There is such a folder structure: /var/test/aaa/bbb/ccc
all folders including test do not contain files
How to delete all empty folders in the test folder, except for the test folder itself?
Command:
find /var/test/ -type d -empty -delete
deletes all folders, including the test folder itself
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question