rmdir
FilesBeginner In simulator In real LinuxRemove empty directories
Name: rmdir = remove directory
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
rmdir removes directories only if they are empty; any entry inside, hidden files included, makes it fail. That limit is a safety net against deleting content by accident.
To remove a directory with its contents, use rm -r.
Syntax
rmdir [OPTION]... DIRECTORY...Common options
| -p / --parents | Also remove parents that become empty |
| -v / --verbose | Print a line for each directory removed |
| --ignore-fail-on-non-empty | Do not complain about directories that are not empty (they stay) |