From ad09901d5446d1097cf9991a55f3b54ef13100e6 Mon Sep 17 00:00:00 2001 From: Tomas Zubiri Date: Wed, 11 Mar 2020 06:36:44 -0300 Subject: [PATCH] cp overwrites files by default, this can be disabled by using the command line option --no-clobber, I'm introducing an alias called --no-overwrites --- src/cp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cp.c b/src/cp.c index 8db2c4b9e..caaaa2cf9 100644 --- a/src/cp.c +++ b/src/cp.c @@ -115,6 +115,7 @@ static struct option const long_opts[] = {"interactive", no_argument, NULL, 'i'}, {"link", no_argument, NULL, 'l'}, {"no-clobber", no_argument, NULL, 'n'}, + {"no-overwrites",no_argument,NULL, 'n'}, {"no-dereference", no_argument, NULL, 'P'}, {"no-preserve", required_argument, NULL, NO_PRESERVE_ATTRIBUTES_OPTION}, {"no-target-directory", no_argument, NULL, 'T'}, @@ -180,8 +181,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\n\ - a previous -i option)\n\ + -n, --no-clobber, --no-overwrites do not overwrite an existing file\n\ + (overrides a previous -i option)\n\ -P, --no-dereference never follow symbolic links in SOURCE\n\ "), stdout); fputs (_("\ @@ -1152,7 +1153,7 @@ main (int argc, char **argv) if (make_backups && x.interactive == I_ALWAYS_NO) { error (0, 0, - _("options --backup and --no-clobber are mutually exclusive")); + _("options --backup and --no-overwrites are mutually exclusive")); usage (EXIT_FAILURE); } -- 2.24.1.485.gad05a3d8e5.dirty