On Sun, Jul 19, 2015 at 03:10:09AM +1000, Andrew McGlashan wrote: > > On 18/07/2015 9:40 PM, The Wanderer wrote: > > mmv "file.~*~' "file.#1" > > > Okay, well from the OP ... > > $ cp --backup=t file /destination/file > > > First time use of mmv: > > $ mmv "file.~*~" "file.#1" > > > However, the next time you try the cp again, it will create a new ~1~ as > it doesn't exist and using mmv won't give the desired result. > > > So you would need to do: > > $ (cd /destination; mmv "file.*" "file.~#1~") > $ cp --backup=t file /destination/file > $ (cd /destination; mmv "file.~*~" "file.#1")
Andrew, thanks for your addition to this interesting thread. Unfortunately the implication is that no simple command will copy a file to another directory and avoid clash by sequentially numbering the copies. It will be simpler just to live with the "~" signs. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150719150715.ga23...@engels.historicalmaterialism.info