[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cp output format



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")



Cheers
A.



Reply to: