GNU bug report logs - #24730
rmdir/mkdir error(s) and/or not working "reciprocally" w/each other

Previous Next

Package: coreutils;

Reported by: "L. A. Walsh" <coreutils <at> tlinx.org>

Date: Tue, 18 Oct 2016 20:02:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "L. A. Walsh" <coreutils <at> tlinx.org>
To: bug-coreutils <at> gnu.org
Subject: rmdir/mkdir error(s) and/or not working "reciprocally" w/each other
Date: Tue, 18 Oct 2016 12:49:44 -0700
It doesn't seem rmdir and mkdir are behaving "reciprocally"...

If I type

mkdir -p ./a/b/c   # no error
rmdir -p ./a/b/c   # get error msg, but a,b,c removed.

1) thinking either rmdir shouldn't generate an error or mkdir should

mkdir -p a/../b      # no error
rmdir -p a/../b      # error, but a & b removed

2) similar comment to above -- leading to:

for rmdir, if "-p" is used, then as similar to "mkdir -p":
  (no error if existing, make parent directories as needed)

rmdir -p should be
  "no error if dir not empty, but directories are followed
and deleted as possible".

======> seems to be best wording & solution:

"mkdir -p", it seems should really be restated to:

   follow given path and make directories as possible"

then "rmdir -p" could be

   "follow given path and delete directories if empty"


Does that look reasonable?

linda w.


  











This bug report was last modified 8 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.