From: Pádraig Brady
Date: Sun, 17 Apr 2022 12:11:09 +0000 (+0100) Subject: doc: rmdir: clarify --ignore-fail-on-non-empty operation X-Git-Tag: v9.2~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd614d6011f64e06852adc532e7357de59f4bac3;p=thirdparty%2Fcoreutils.git doc: rmdir: clarify --ignore-fail-on-non-empty operation 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 --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 3ebd068e16..e7b53af536 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 53311db8d7..f6284cbe26 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 (_("\