- Rmdir
rmdir
(orrd
) is a command which will remove an empty directory on aUnix ,DOS ,OS/2 orMicrosoft Windows operating system . In Unix, it cannot be capitalized, whereas this doesn't apply for DOS, OS/2 and Windows. Normal usage is straightforward where one types:rmdir name_of_directory
Where name_of_directory corresponds with the name of the directory one wishes to delete. There are options to this command such as -p in Unix which removes parent directories if they are also empty.
For example:
rmdir -p foo/bar/baz
Will first remove baz/, then bar/ and finally foo/ thus removing the entire directory tree specified in the command argument.
rmdir will not remove a directory if it is not empty in UNIX. The correct way to remove a directory and all its contents recursively is with the rm command. For example:
rm -r foo/bar/baz
The DOS equivalent of this command is
deltree , orrd /s directory_name
in Microsoft Windows.
ee also
*
List of Unix programs
*List of DOS commands References
* [http://www.linuxmanpages.com/man1/rmdir.1.php] The program's
manpage External links
* [http://technet.microsoft.com/en-us/library/cc754993.aspx Microsoft TechNet Rmdir article]
Wikimedia Foundation. 2010.