scp: Problem when source and destination are identical
Ed L Cashin
ecashin at terry.uga.edu
Sat May 26 09:51:06 EST 2001
Gert Doering <gert at greenie.muc.de> writes:
> Hi,
>
> On Wed, May 23, 2001 at 03:07:28PM -0500, Jim Knoble wrote:
> > What i would much rather see is for the destination scp to write the
> > incoming file to a temporary file in the same directory, and then
> > rename() it to the destination file on a successful copy.
>
> Strongly seconded. But Markus doesn't seem to like it, for no other
> reason than "you can use tar/mv/rsync to do this".
I agree with Markus, if that's his position. Commands should do what
we expect, and I don't expect something that looks like a secure
version of rcp to be writing to temporary files and doing rename(2).
> > Against: Requires enough space available on the destination filesystem
> > to hold both the old and the new copy of each file; this could
> > be a drawback for large files.
>
> Which is a good argument for having a switch to control this.
Or just use a different tool, like rsync, that is designed for this
kind of thing.
--
--Ed Cashin PGP public key:
ecashin at terry.uga.edu http://www.terry.uga.edu/~ecashin/pgp/
More information about the openssh-unix-dev
mailing list