From 7a69df88999bedd8e9fccf9f3dfa9ac6907fab66 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 31 Jan 2023 08:46:21 -0800 Subject: cp,ln,mv: when skipping exit with nonzero status * NEWS, doc/coreutils.texi: Document this. * src/copy.c (copy_internal): * src/ln.c (do_link): Return false when skipping action due to --interactive or --no-clobber. * tests/cp/cp-i.sh, tests/cp/preserve-link.sh: * tests/cp/slink-2-slink.sh, tests/mv/i-1.pl, tests/mv/i-5.sh: * tests/mv/mv-n.sh, tests/mv/update.sh: Adjust expectations of exit status to match revised behavior. --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index d714b8f3b..c2d3a42ec 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,11 @@ GNU coreutils NEWS -*- outline -*- 'cp --reflink=always A B' no longer leaves behind a newly created empty file B merely because copy-on-write clones are not supported. + 'cp -n' and 'mv -n' now exit with nonzero status if they skip their + action because the destination exists, and likewise for 'cp -i', + 'ln -i', and 'mv -i' when the user declines. (POSIX specifies this + for 'cp -i' and 'mv -i'.) + cp, mv, and install again read in multiples of the reported block size, to support unusual devices that may have this constraint. [behavior inadvertently changed in coreutils-7.2] -- cgit v1.2.1