Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).

share|improve this question
Short answer: No. scp is never harmful. – Shadur May 31 '12 at 9:01
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with -u. – Gilles May 31 '12 at 22:46
@Gilles As with any tool, you must understand what it does and how it does it to use it safely. – Alex Chamberlain Jun 1 '12 at 7:24
In that context, regular cp and rm would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid", rsync isn't any less harmful. – Shadur Jun 1 '12 at 9:31
scp -a will not work, and will be slower. I see no reason to use it, if you have something else at hand. rsync is less harmfull in the sense that it can at least preserve symlinks, so can cp. – mikebloch Jun 10 '12 at 12:09
up vote 9 down vote accepted

If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.

share|improve this answer
rsync speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster than scp. – psusi May 31 '12 at 22:19
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/… . Try scp vs rsync of your /usr/bin/ dir for example. – Not Now May 31 '12 at 22:43
It looks like scp does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan. – psusi Jun 1 '12 at 14:32
Interesting. rsync should have more overhead, since it needs to check in advance if the target(s) exists. – Nils Jun 10 '12 at 20:56
I don't see how this answers the question – eric May 15 '15 at 2:11

scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.

rsync allows you to syncronise remote folders.

They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.

share|improve this answer
Also, pretty sure rsync has to be installed on the other end. – ckhan May 31 '12 at 7:59
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient. – mikebloch May 31 '12 at 8:40
I like scp's simplicity. – Alex Chamberlain May 31 '12 at 9:29
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't find rsync on the remote. – Alexios May 31 '12 at 10:00
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and why zsync was created as an alternative. – psusi May 31 '12 at 22:17

One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.

I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.

share|improve this answer
Might be worth adding that the --partial flag is useful when transferring large files. rsync will pick up where it left off within the file rather than starting that file again. – Flup Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory. – Lester Cheung Mar 1 at 10:56

scp is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)

share|improve this answer
Hmmm, why is it so? rsync a host:b is equivalent to scp a host:b, same number of arguments. – mikebloch Apr 9 '13 at 5:40
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game. – Nils Apr 9 '13 at 14:44

User Chris at Webhosting Talk writes:

rsync compares the files at each end and transfers only the changed parts of changed files. When you transfer files the first timeo it behaves pretty much like scp, but for a second transfer, where most files are unchanged, it will push a lot less data than scp. It's also a convenient way to restart failed transfers - you just reissue the same command and it will pick up where it left off the time before, whereas scp will start again from scratch.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.