rmdirremove directory |
Command |
rmdir
[-p
]
directory...
rmdir
command removes each requested directory.
Each directory must be empty for rmdir
to be successful.
-p
removes all intermediate components. For example,
is equivalent tormdir -p abc/def/ghi
rmdir abc/def/ghi rmdir abc/def rmdir abc
0
Successful completion.
1
Failure because directory is not a directory, or because it still contains files or subdirectories.
2
Failure because of an invalid command line option, or no directory names specified.
means that files or other directories are found under the directory to
be removed. Use rm
-r
to remove the directory.
means that the requested directory does not exist or is otherwise inaccessible.
indicates that you should use
cd
to change to another directory
before removing the current directory.