Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have directories and files locally and I want to copy them over to another box using rsync . The problem is that most of the data is already on the remove box, but not on the target disk. E.g., I have

local:~/$ ls -F
a/ b/ foo


remote:~/dest$ ls -F

where remote:~/dest/a points to a directory which already contains most of local:~/a.

When I do

local$ rsync --append-verify --progress -auv * remote:~/dest/

symlink remote:~/dest/a is replaced with an empty directory where rsync starts copying data from local.

How do I accomplish the effect of

local$ rsync --append-verify --progress -auv foo remote:~/dest/
local$ rsync --append-verify --progress -auv a/* remote:~/dest/a/
local$ rsync --append-verify --progress -auv b remote:~/dest/

with a single rsync invocation?

share|improve this question
up vote 1 down vote accepted

From the rsync man page :

    -K, --keep-dirlinks         treat symlinked dir on receiver as dir
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.