From 63e9f1ae61e4b48ab8fe505a7d9bd1ae092c1a32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Sun, 17 Dec 2023 14:35:36 +0000 Subject: [PATCH] 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. --- doc/coreutils.texi | 2 ++ src/cp.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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\ -- 2.47.2