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

I would like to copy a directory of files from a remote server to my local machine. As it is a large number of files, the option of ignoring existing files is desirable.
Unfortunately, rsync is not available for some reason (the remote server is from a CDN service, and beyond my control).

So I think I am stuck using scp -r on the folder in question.

Is there anyway of doing this while ignoring existing files?

share|improve this question
Do you need to check file dates / sizes or is the file existing good enough? – Caleb Jul 7 '11 at 6:46
up vote 5 down vote accepted

SSHFS allows you to mount a remote directory accessed over SSH, more precisely over SFTP. Once you've mounted the remote directory, use rsync on what are now local files.

mkdir ~/cdn
sshfs cdn.example.com: ~/cdn
rsync -au ~/mystuff/dir/ ~/cdn/dir/
share|improve this answer

You could login remotely to create a list of existing files, then use that locally to create a list of files that need to be transfered and build an scp command to send them over.

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.