coreutils
[Top][All Lists]
Advanced

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

[PATCH] doc: rmdir: clarify --ignore-fail-on-non-empty operation


From: Pádraig Brady
Subject: [PATCH] doc: rmdir: clarify --ignore-fail-on-non-empty operation
Date: Sun, 17 Apr 2022 13:49:59 +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 | 3 +--
 src/rmdir.c        | 9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3ebd068e1..e7b53af53 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -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
diff --git a/src/rmdir.c b/src/rmdir.c
index 53311db8d..f6284cbe2 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -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 (_("\
-- 
2.26.2




reply via email to

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