2

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.

Thx

3 Answers3

3

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

Karthik
  • 66
1

Use Beyond Compare tool for comparing folders & files

Siva Charan
  • 4,913
1

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).

Cougar
  • 569