Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Resuming an aborted scp transfer (See related posts)

Assume you have copied a file across the network using something like this:

scp host:/path/to/file .


Then assume something goes wrong, so the transfer is interrupted. To continue the transfer, do this:

rsync --partial host:/path/to/file .


(Or, rather, always use rsync as above when transferring very large files.)

(Also note: I don't know how frequently rsync flushes its buffer, but don't assume something is wrong just because the file you're downloading doesn't increase in size in the file system. When you interrupt rsync using Ctrl-C, it will flush its buffers.)

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts