From: Pádraig Brady
Date: Sun, 17 Dec 2023 14:35:36 +0000 (+0000) Subject: doc: cp --no-clobber: improve documentation X-Git-Tag: v9.5~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63e9f1ae61e4b48ab8fe505a7d9bd1ae092c1a32;p=thirdparty%2Fcoreutils.git doc: cp --no-clobber: improve documentation * doc/coreutils.texi (cp invocation): Reference the related --update option, like we had already done in mv invocation. * src/cp.c (usage): State clearly what --no-clobber does, indicating it's protection focused, rather than being update focused. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 1f8b356d12..bf0f424d34 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9057,6 +9057,8 @@ Do not overwrite an existing file; silently fail instead. This option overrides a previous @option{-i} option. This option is mutually exclusive with @option{-b} or @option{--backup} option. +See also the @option{--update=none} option which will +skip existing files but not fail. @item -P @itemx --no-dereference diff --git a/src/cp.c b/src/cp.c index 04a5cbee38..3ccc4c4e60 100644 --- a/src/cp.c +++ b/src/cp.c @@ -192,8 +192,8 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\ -L, --dereference always follow symbolic links in SOURCE\n\ "), stdout); fputs (_("\ - -n, --no-clobber do not overwrite an existing file (overrides a\n\ - -u or previous -i option). See also --update\n\ + -n, --no-clobber ensure no existing files overwritten, and fail\n\ + silently instead. See also --update\n\ "), stdout); fputs (_("\ -P, --no-dereference never follow symbolic links in SOURCE\n\