rcp behavior

Barry Margolin barmar at think.com
Fri Nov 9 10:19:35 AEST 1990


In article <1990Nov5.192620.1467 at nbc1.ge.com> scott at nbc1.GE.COM (Scott Barman) writes:
>	rcp some_file nbc1:~scott/src/zz
>
>allegedly copying the same file into itself.  I did this several times
>before I realized what I was doing.  No messages, error or otherwise.
>
>HOWEVER, it did not destroy the copy of the file--THANKFULLY!  My
>question is why?  How does rcp work so that if I mess up like above, my
>8k of carefully constructed data doesn't disappear?

I suspect you lucked out, due to asynchronous timing and caching.

"rcp srcfile host:destfile" is effectively equivalent to

	rsh host "cat >destfile" <srcfile

If the local system has all of the source file in its NFS cache, and the
cache doesn't time out too soon, this should work.

P.S.  If NBC is on the net, can I send "viewer email" to David Letterman?
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.internals mailing list