Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparison of 2 text files: what and where changes were made?

imagine you have 2 texfiles (let's say 500kB - 3 MB large): the first is original, the second is the update of this original. How can I find out, what was changed (inserted, deleted) and where the changes took place (in the update file in comparison to original)?

  1. Is there any tool or library somewhere?
  2. Resides this function in any well known text editors?
  3. Does anybody know an algorithm? Or what are the common methods to solve it on the large scale?
  4. What would you do if you face this kind of problem?

Thanx for your ideas...

like image 595
lyborko Avatar asked Oct 14 '22 22:10

lyborko


2 Answers

What you're describing sounds exactly like a diff-style tool. This sort of functionality is available in many of the more advanced text editors.

like image 176
Michael Madsen Avatar answered Oct 18 '22 02:10

Michael Madsen


You can try Notepad++ it is an open source text editor that has a compare files plug in.

like image 37
Itay Karo Avatar answered Oct 18 '22 02:10

Itay Karo