File comparison compares the contents of computer files, finding their common contents and their differences. The result of the comparison is often known as a diff.
diff is also the name of a famous console based file comparison utility that outputs the differences between two files. The diff utility was developed in the early 1970s on the Unix operating system. Typically, diff is used to show the changes between two versions of the same file. Modern implementations also support binary files.
Linux has many good GUI tools that enable you to clearly see the difference between two files or two versions of the same file. This roundup selects 6 of our favourite GUI diff tools. All of them are open source goodness.
These utilities are an essential software development tool, as they visualize the differences between files or directories, merge files with differences, resolve conflicts and save output to a new file or patch, and assist file changes reviewing and comment production (e.g. approving source code changes before they get merged into a source tree). They help developers work on a file, passing it back and forth between each other. The diff tools are not only useful for showing differences in source code files; they can be used on many text-based file types as well. The visualizations make it easier to compare files.
Here’s our software recommendations. DiffPDF is different from the other tools, as it compares two PDF files.
|Meld||Graphical diff viewer and merge application for the Gnome desktop|
|Kompare||KDE diff tool supporting a variety of diff formats|
|Diffuse||Tool for merging and comparing text files|
|KDiff3||Text difference analyzer for up to 3 input files|
|DiffPDF||Compare two PDF files|
|xxdiff||File and directories comparator and merge tool|
We’ve covered the best console based diff tools in a separate article available here.
Read our complete collection of recommended free and open source software. The collection covers all categories of software.
The software collection forms part of our series of informative articles for Linux enthusiasts. There's tons of in-depth reviews, alternatives to Google, fun things to try, hardware, free programming books and tutorials, and much more.