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

Imagine that you have 2 texfiles (let's say 500kB - 3 MB big): the first original, the second is an update of this original. How can I find out what has been changed (inserted, deleted) and where the changes occurred (in the update file compared to the original)?

  • Is there any tool or library?
  • Saves this function in any well-known text editors?
  • Does anyone know the algorithm? Or what are the common methods for solving it on a large scale?
  • What would you do if you encountered such a problem?

Thanx for your ideas ...

+5
source share
6 answers

, , diff. .

+2
+1

wikipedia .

, SED AWK Unix - Windows. , - (, ).

+1

- -?

. diff, , . , diff. , diffmerge, Kompare vimdiff.

?

, vim, Eclipse, .

- ? ?

Longest common subsequence algorithm, LCS.

LCS , . , , LCS, , .

, ?

, , , .

0

unix diff ; GNU, wdiff, Linux Cygwin.

:

0

All Articles