[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rmdir -p foo/bar/nonexistent

From: Koblinger Egmont
Subject: rmdir -p foo/bar/nonexistent
Date: Mon, 10 Apr 2006 14:28:03 +0200
User-agent: Mutt/1.5.8i


Using coreutils 5.94, the command
  rmdir -p foo/bar/nonexistent
does not remove the `foo' or `foo/bar' empty directories if the mentioned
subdirectory (foo/bar/nonexistent) does not exist.

The documentation (man, info, --help) do not specify the behavior in this
case. They only say this command is similar to "rmdir foo/bar/nonexistent
foo/bar foo" but gives no clue what the word "similar" means.

However, as "mkdir -p" succeeds if part of the tree is already created, I'd
expect "rmdir -p" to succeed if part of the tree is already removed. That
is, "rmdir -p foo/bar/nonexistent" would ignore the ENOENT from the removal
of `foo/bar/nonexistent', and then try to remove `foo/bar' and `foo'. This
way it would also be more "similar" to what the docs say it is similar to.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]