scp: Problem when source and destination are identical

"Petersen, Jörg" j.petersen at msh.de
Fri May 18 22:27:04 EST 2001


It would be interesting to know how rcp is able to handle this...
With AIX:
myhost / # rcp -p /tmp/txt myhostInterfaceB:/tmp/txt
rcp: /tmp/txt and /tmp/txt refer to the same file (not copied).
(Solaris-rcp doesn't complain like this, but the file remains intact...)
Someone with access to the AIX-Sources ???? ;-)
Jörg

-----Original Message-----
Markus Friedl <markus.friedl at informatik.uni-erlangen.de> writes:

> On Thu, May 17, 2001 at 04:54:27PM +0200, Florian Weimer wrote:
> > If the source and destination file are identical, the receiving scp
> > truncates the file.  On the sending end, read() returns 0, and garbage
> > is sent instead of actual data, and the receiving end puts it into the
> > file, which at least confuses the users.
> 
> how should rcp/scp know that the files are identical?



More information about the openssh-unix-dev mailing list