scp: Problem when source and destination are identical
Jason Stone
jason at shalott.net
Sat May 19 08:07:34 EST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It would be interesting to know how rcp is able to handle this...
ssh.com's scp also successfully copies a file on top of itself. OpenSSH
opens the destination file O_TRUNC, while rcp and ssh.com scp don't.
In my opinion, opening the file O_TRUNC is the right thing to do because
in the usual case (scp from one system to another), you expect the
destination file to be truncated to 0 length before you start - you don't
want to start copying a new file over and old one and then end up with a
weird combination of both should the scp die in the middle....
-Jason
---------------------------
If the Revolution comes to grief, it will be because you and those you
lead have become alarmed at your own brutality. --John Gardner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (FreeBSD)
Comment: See https://private.idealab.com/public/jason/jason.gpg
iD8DBQE7BZ0uswXMWWtptckRAvDxAJ99SmyF+4Qffkxo79dR5sRaQ0KEmgCcC+em
HD13Xfa9fAcOPTZp09ePxvk=
=I0GZ
-----END PGP SIGNATURE-----
More information about the openssh-unix-dev
mailing list