From dm0env@scs.cs.nyu.edu Mon Jan 19 04:00:15 2004
Return-Path: <dm0env@scs.cs.nyu.edu>
Received: from cs.nyu.edu (cs.nyu.edu [128.122.80.78])
	by griffin.cs.nyu.edu (8.12.10+Sun/8.12.10) with ESMTP id i0J90Fb0000156
	for <shasha@griffin.cs.nyu.edu>; Mon, 19 Jan 2004 04:00:15 -0500 (EST)
Received: from amsterdam.lcs.mit.edu (amsterdam.lcs.mit.edu [18.26.4.9])
	by cs.nyu.edu (8.12.9/8.12.9) with ESMTP id i0J90FYK021995
	for <shasha@cs.nyu.edu>; Mon, 19 Jan 2004 04:00:15 -0500 (EST)
Received: (from dm@localhost)
	by amsterdam.lcs.mit.edu (8.11.6p2/8.11.6) id i0J90DW29746
	for shasha@cs.nyu.edu; Mon, 19 Jan 2004 04:00:13 -0500 (EST)
	(envelope-from dm0env@scs.cs.nyu.edu)
Date: Mon, 19 Jan 2004 04:00:13 -0500 (EST)
Message-Id: <200401190900.i0J90DW29746@amsterdam.lcs.mit.edu>
From: David Mazieres <200203041606.g24G60795304@scs.cs.nyu.edu>
To: shasha@cs.nyu.edu
In-reply-to: <200401190829.i0J8T41A026816@griffin.cs.nyu.edu> (message from
	Dennis Shasha on Mon, 19 Jan 2004 03:29:04 -0500 (EST))
Subject: Re: better scp?
References:  <200401190829.i0J8T41A026816@griffin.cs.nyu.edu>
Content-Length: 946
Status: R

> Date: Mon, 19 Jan 2004 03:29:04 -0500 (EST)
> From: Dennis Shasha <shasha@cs.nyu.edu>
> 
> Dear David,
> I am often doing an scp of a directory that doesn't change that
> much. The scp is kind of dumb though and copies everything.
> I seem to recall that you have a much smarter scp.
> Can it simply be downloaded and used without my having to change
> anything else?

Try rsync (http://rsync.samba.org/).  It uses delta compression to
transfer as little data as possible.  If you want to copy file /b/c/d
on machine A, just say:

	rsync -vaz shasha@A:/b/c/d/ d

Or to copy over and delete old files that no longer exist:
	
	rsync -vaz --delete shasha@A:/b/c/d/ d

Note that the trailing slash is necessary on /b/c/d/.  If you leave it
off, rsync can do some fairly undesirable things like delete all your
files (no kidding--even ones not in the d directory).  I think they've
improved the behavior, but check the man page to be sure.

David



