in reply to Re^4: file::move and networks
in thread file::move and networks

Quite true. Thanks to both of you.

You need more trickery to achieve the other semantics. Probably not very portable and means there should be a special flag for "don't overwrite" mode.

% steph@ape2 (/home/stephan) % % ll $0 lrwxrwxrwx 1 steph Ninguno 47 Mar 5 15:07 /bin/ksh93 -> /usr/ast-ksh9 +3s/arch/cygwin.i386/bin/ksh93s.exe % steph@ape2 (/home/stephan) % % echo foo > foo; echo bar > bar; /bin/ls -l foo bar; /bin/mv 0<&- 2>& +- -i foo bar; cat -evnt bar -rw-r--r-- 1 steph Ninguno 4 Jul 17 11:36 bar -rw-r--r-- 1 steph Ninguno 4 Jul 17 11:36 foo 1 bar$

Looking at version 3 of the single Unix Specification mv seems to indicate the above trick is ok from a standard perspective.

cheers --stephan