ubuntu
Delete all empty directories in a directory in Ubuntu
You can delete all empty directories in a directory using below command. First we find all directories using find command and then delete them.
# Go to directory and execute command
-------------------------------------
find . -empty -type d -delete
Was this helpful?
Similar Posts
- Find all empty directories in a directory in Ubuntu
- Change directory name or rename a directory in Ubuntu
- Copy a directory along with its content to another directory in Ubuntu
- Remove or Delete a folder or directory in Ubuntu
- Create a new directory or folder in Ubuntu
- Get total size of a directory or folder in Ubuntu
- Copy all folder content to another folder In Ubuntu