How to use `scp` command copy a folder while not rewrite the local file with same name? [closed]

StackOverflow https://stackoverflow.com/questions/23258341

  •  08-07-2023
  •  | 
  •  

سؤال

I am using scp to copy a folder from remote server, however, the it broke during the copy procedure, I am trying to re-scp, but I just don't want to over-write files in the folder that have been copied to the local.

So is it possible to use scp to copy a folder from remote server while don't over-write the destination local file with same name?

هل كانت مفيدة؟

المحلول

Just use rsync. The syntax is almost the same, it works over ssh too, and it intelligently transfers only differences between files. Example:

rsync *.jpg hostname:yourdir
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top