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

How would I go about rsyncing the difference between two directories to a 3rd directory. For example, if I have the command

rsync -av --progress --stats /hdd1/ /hdd2/

I would like to copy the difference between hdd1 and hdd2 to a 3rd directory, without copying any data to hdd2 (as it is a full hard drive). What's the best way to go about this?

share|improve this question
up vote 2 down vote accepted

Maybe the --compare-dest option of rsync could be helpful. I think

rsync -av --progress --stats --compare-dest=/hdd2 /hdd1/ /3rd_dir/

might work.

share|improve this answer
I just noticed the compare-dest argument is relative to the '3rd_dir'. In this case you are using absolute path, but if hdd2 where a dir relative to 3rd_dir, you would need to use the relative path from 3rd_dir. – code-gijoe Aug 13 '12 at 14:24

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.