Koblinger Egmont <[EMAIL PROTECTED]> writes:

> 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's a natural expectation, but it disagrees with common practice
(e.g., Solaris 10).  POSIX isn't 100% clear on this point but I think
the intent is to do as Solaris and coreutils do.

You can work around most of the problem in a script as follows:

test ! -e "$dir" || rmdir -p "$dir"

If there's a real need for an option that works the way you suggest, I
suppose it could be added; but it shouldn't be called "-p".


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to