On Mon, 2006-06-12 at 13:54 -0500, Les Mikesell wrote: > On Mon, 2006-06-12 at 14:42 -0400, Todd Zullinger wrote: > > Les Mikesell wrote: > > > Yes, if you are going to be transferring more than one file you > > > might as well do it in way you can interrupt and restart > > > efficiently. And, scp doesn't have the handy and obvious > > > '-a' counterpart to gnu cp and rsync. > > > > Nor the fabulously efficient transfer of only the changed bits of a > > file. :) > > > > I agree completely that rsync is a better tool for most jobs like this > > and use it all the time myself, while I only rarely use scp. > > > > Of course, it's man page is rather large and can be daunting to get > > your head around on first read. But it's features make it well worth > > the time spent learning to use it. > I find this technique works for almost everything I want to copy: > cd source_dir > rsync -essh -av . user@remote_host:/path/to/dir The -essh is now optional if all you want is straight ssh. That's now the default. They dropped the rsh transport some time ago although you still use the RSYNC_RSH environment variable to set that transport if you want something OTHER than ssh or if you want to include some ssh parameters (like a -i identity file). > (or individual files/wildcards may be specified instead of . for > the whole current directory tree). > The final element on the target path will be created if it doesn't > exist (but only one) and by specifying . as the source you don't > have to remember whether or not to add a trailing slash to a > directory name. For low bandwidth connections I might throw > in the -z flag for compression. > > -- > Les Mikesell > lesmikesell@xxxxxxxxx Mike -- Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw@xxxxxxxxxxxx /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
Attachment:
signature.asc
Description: This is a digitally signed message part