how to delete all empty directories in linux


 description

Delete the test1 directory, the directory is not empty, the deletion fails

 command

rmdir -v test1/

 parameter

rmdir :  delete if the directory is empty
-v, --verbose :  output deletion log

 result

rmdir: removing directory, 'test1/'
rmdir: failed to remove 'test1/': Directory not empty

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.