Erase the source file open; specify a tempfile name option
Wayne Davison
wayne at blorf.net
Mon May 21 04:39:27 EST 2001
On Sun, 20 May 2001, Markus Friedl wrote:
> On Sun, May 20, 2001 at 01:31:43AM -0700, Wayne Davison wrote:
> > Consider why "mv" exists when we have "cp" and "rm".
>
> because
> mv a b
> does not copy and is very different from
> cp a b; rm a
Yes, I was wrong about the general case, but if the file cannot be
renamed (i.e. it crosses a file system), mv is idential to your cp/rm
example, which is what I was thinking of in the scp case.
> i think that both rcp and scp are very basic tools, just like cp.
Yes. I would be very comfortable adding the "how do you want me to
write the file" option to cp as well (using a tempfile or directly).
I would also supply the additional caveat that since we're crossing
system boundaries that it behooves us to make the simple tasks a little
more efficent than what we need in local commands.
Has the move option also been rejected? I noticed one mention on the
net that scp2 added -u (unlink) for this.
..wayne..
More information about the openssh-unix-dev
mailing list