Contents
What is rmdir used for in Linux?
rmdir command is used remove empty directories from the filesystem in Linux. The rmdir command removes each and every directory specified in the command line only if these directories are empty. So if the specified directory has some directories or files in it then this cannot be removed by rmdir command.
What will do the rmdir command?
The rm command is used to delete files.
- rm -i will ask before deleting each file. …
- rm -r will recursively delete a directory and all its contents (normally rm will not delete directories, while rmdir will only delete empty directories).