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!
Got Feedback? Join the discussion at discuss.howtogeek.com
Comments (1)
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 12/22/09




That should be:
alias scp=’rsync -avzP’
Or rather, to avoid confusion later:
alias scp2=’rsync -avzP’