On 2018年06月01日 12時56分, Kaz Kylheku (Coreutils) wrote:
cp -rl old/. new/.

The new/ tree is populated with hard links to corresponding objects in
old, which is what mv will do (on the same filesystem, anyway).

A popular answer to my original question claims that "cp -rl" creates a race 
condition:

https://unix.stackexchange.com/a/127713/96349

I now consider this a moot point, as such "race conditions" would be inevitable 
with a recursive move operation.  Thank you for the solution.

cp with --remove-source would just about obsolesce mv.

I noticed some of the source for mv comes straight from cp (e.g. cp_options and 
cp_option_init).

Reply via email to