mv: new option --exchange
commit5d3fd24f4286d422482dd1697c9fe1bfa30f608e
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Mar 2024 21:00:25 +0000 (20 14:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 Mar 2024 21:40:29 +0000 (20 14:40 -0700)
tree1b0e2a134bdf061f4ff85921141354141bf83a91
parent425b8a2f534fe02e8c1e39ad6a3d2c18eca12de3
mv: new option --exchange

* src/copy.h (struct cp_options): New member 'exchange'.
* src/copy.c (copy_internal): Support the new member.
* src/mv.c (EXCHANGE_OPTION): New constant.
(long_options): Add --exchange.
(usage): Document --exchange.
(main): Support --exchange.
* tests/mv/mv-exchange.sh: New test case.
* tests/local.mk (all_tests): Add it.
NEWS
doc/coreutils.texi
src/copy.c
src/copy.h
src/mv.c
tests/local.mk
tests/mv/mv-exchange.sh [new file with mode: 0755]