rmdir - Linux command line tool to delete directories
Follow @ggarronrmdir is a command, to remove or erase directories. Remember that the directories should be empty to be deleted.
Usage
rmdir [options] directory_list
Options
- --ignore-fail-on-non-empty
- Suppresses the message rmdir normally displays when it fails to delete a directory because it is not empty
- --parents -p
- Removes the given directory and its children if they are empty
- --verbose -v
- Displays the names of directories as they are being removed
- -r
- Removes the directory if it is not empty, It removes the contents also
Example
rmdir --parents dirctory1/directory2/directory3
This will remove the directories, directory1, directory2, and directory3.