SEARCH

How-To Geek

Use Rsync as a Drop-In SCP Replacement

Tired of the SCP command dropping out in the middle of a transfer, and generally being unreliable? You can use the vastly superior rsync utility that supports resuming a dropped transfer—a killer feature when you’re moving big files around.

So what we’ll do is just set an alias to make scp use the correct rsync flags:

alias scp=’rsync avzP’

Of course, you’ll want to put this into your ~/.bashrc or bash_profile, depending on your system setup. Once you’ve done so, you can use the scp command just like you always did before, but it will use rsync instead of scp.

scp filename.zip username@servername:/path/to/filename.zip

It’s one of those really excellent tips that we love, and it was sent in by our buddy Daniel over at Code Commit. He’s nerdy!

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 12/22/09

Comments (1)

  1. Martin

    That should be:
    alias scp=’rsync -avzP’

    Or rather, to avoid confusion later:
    alias scp2=’rsync -avzP’

Enter Your Email Here to Get Access for Free:

Go check your email!