I was copying hundreds of files to another computer using the scp
command that I got the stalled
error. Now I am going to copy the files again. Is there any way to avoid copying the already copied files?
How to copy only new files using “scp” command
scp
Best Answer
You can use
rsync
for it.rsync
is really designed for this type of operation.Syntax:
or
When you run it first time it will copy all content then it will copy only new files.
If you need to tunnel the traffic through a SSH connection (for example, for confidentiality purposes), as indicated by you originally asking for a SCP-based solution, simply add
-e ssh
to the parameters torsync
. For example: