Can scp be used to update a directory?

Andy Green andy at warmcat.com
Sat Mar 18 15:27:22 UTC 2006


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.

-Andy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4492 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060318/1a422e1c/attachment-0001.bin>


More information about the fedora-list mailing list