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

About this user

Peter Lindberg http://peterlindberg.se

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Resuming an aborted scp transfer

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.)

Doing something equivalent of "svn status" in CVS

The "cvs status" command is practically useless, given the amount of stuff it spews out. So I do the following to find out the status of my local working copy. This shows all updated, added, or deleted files, as well as those CVS know nothing about (and which perhaps should be added):

cvs status 2>&1 | egrep "(^\? |Status: )" | grep -v Up-to-date
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS