Answer the question
In order to leave comments, you need to log in
How to find empty folders in linux in terminal?
How to find empty folders in linux terminal and delete them without deleting the child folder?
find /shared/trash/temp/ -empty -type d
Gives the result:
/shared/trash/temp/ - i.e. also a candidate for deletion. folder is empty.
How to avoid deleting the parent folder when it is empty? This task will hang in crontab and delete empty folders and old files in the temp folder
find /shared/trash/temp/ -empty -type d deletes the parent folder too, it doesn't help! And the links are also just the same solution :(
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