I checked the man page for it using man rmdir
and all it has is --ignore-fail-on-non-empty
, -p
, -v
, --help
, and --version
. What am I missing?
I'm using Ubuntu 12.04 LTS
rmdir
has no -r
option. The purpose of rmdir
is to delete only empty directories.
If you want to delete non-empty directories, that's when you'll use the -r
option of the command rm
.
Delete empty directory called emptydir:
$ rmdir emptydir
If directory nonemptydir is non-empty, you'll have an error:
$ rmdir nonemptydir
rmdir: failed to remove `nonemptydir': Directory not empty
To delete non-empty directory nonemptydir:
$ rm -r nonemptydir
Hope this helps!
rmdir -r
for some reason, or maybe its just because I've been awake all night :P
Sep 28, 2013 at 15:27