Can scp be used to update a directory?

Anne Wilson cannewilson at tiscali.co.uk
Sat Mar 18 17:26:56 UTC 2006


On Saturday 18 March 2006 15:27, Andy Green wrote:
> Anne Wilson wrote:
> > The scp man page is not very verbose ;-)  I want to copy a directory,
> > recursively, over the lan, but only those files that are new or updated.
> > MS-DOS could do this back in ...Ummm.... so I can't believe it can't be
> > done in scp, but I can't see how to do it.
>
> Use rsync for such tasks.  It natively understands how to move files
> over ssh.  Eg
>
> rsync -avz mysourcedir user at desthost:/path/on/destination
>
> will just update/transmit files changed in the source dir compared to
> the destination.
>
Oops - I think I've just made a terrible mistake.  I rsync'd my home 
directory, forgetting that it would take the hidden files and config files 
with it.  Now I'll have to see what damage is done.

Anne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060318/b9aa88ea/attachment-0001.sig>


More information about the fedora-list mailing list