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

Does anybody knows a way to compare 2 versions of a directory to create a 3rd one with the difference of both?

I need it to make incremental updates of my software.


share|improve this question
You might find this article very helpful. – Oliver Salzburg Mar 13 '12 at 12:58
up vote 3 down vote accepted

You can use the following command

$ diff -qr <path_of_folder1> <path_of_folder2>

This does an incremental and recursive comparison of both the folders. If you want, you can rsync both the folders to

share|improve this answer
basically I will use RSYNC! – code-gijoe Mar 14 '12 at 15:15

Use Beyond Compare tool for comparing folders & files

share|improve this answer

What do your mean with "dfference"?

If you mean patch type difference then use "diff" with "--recursive" flag.

If you mean copying files which are only in second directory or are different in second directory, then it is called "incremental backup". For example use "rsync" with "--backup-dir=DIR" option.

If you need versioning (for software development for instance) then take git (or subversion).

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.