]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: rmdir: clarify --ignore-fail-on-non-empty operation
authorPádraig Brady <P@draigBrady.com>
Sun, 17 Apr 2022 12:11:09 +0000 (13:11 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 17 Apr 2022 12:46:03 +0000 (13:46 +0100)
This option has changed from ignoring only ENOTEMPTY|EEXIST
(i.e. ignore errors _solely_ due to dir not empty),
to ignoring some other errors from more protected dirs
that are not empty.  That adjustment was made to better
support use with --parents, to essentially remove as much of
a hierarchy as possible, without erroring as we hit more
protected non empty parent dirs.
That functionality adjustment was originally discussed at:
https://lists.gnu.org/r/bug-coreutils/2008-01/msg00283.html

* src/rmdir.c (usage): Adjust to be more accurate to current behavior.
Also adjust --parents option to be easier to read.
* doc/coreutils.texi (rmdir invocation): Likewise.
Reported at https://github.com/coreutils/coreutils/issues/40

doc/coreutils.texi
src/rmdir.c

index 3ebd068e1603737d57603cdd0c0e2660241bb863..e7b53af536a59ee5fc5cdec6bb15a90dd296c6f4 100644 (file)
@@ -11163,8 +11163,7 @@ The program accepts the following options.  Also see @ref{Common options}.
 @item --ignore-fail-on-non-empty
 @opindex --ignore-fail-on-non-empty
 @cindex directory deletion, ignoring failures
-Ignore each failure to remove a directory that is solely because
-the directory is non-empty.
+Ignore each failure to remove a directory that is non-empty.
 
 @item -p
 @itemx --parents
index 53311db8d7adf1d69fb2adf2025d770b16317ce7..f6284cbe2611aac3556f939964dfc6bb208f6a42 100644 (file)
@@ -178,14 +178,11 @@ Remove the DIRECTORY(ies), if they are empty.\n\
 "), stdout);
       fputs (_("\
       --ignore-fail-on-non-empty\n\
-                    ignore each failure that is solely because a directory\n\
-                    is non-empty\n\
-\n\
+                    ignore each failure to remove a non-empty directory\n\
 "), stdout);
       fputs (_("\
-  -p, --parents     remove DIRECTORY and its ancestors; e.g., 'rmdir -p a/b/c'\
-\n\
-                    is similar to 'rmdir a/b/c a/b a'\n\
+  -p, --parents     remove DIRECTORY and its ancestors;\n\
+                    e.g., 'rmdir -p a/b' is similar to 'rmdir a/b a'\n\
 \n\
 "), stdout);
       fputs (_("\