Compare two files side-by-side with Kompare

If you're a command line expert, you undoubtedly know about the diff and patch tools, which let you see the difference between two files and then create or apply patch files from those differences respectively.

Sometimes though, it's nice to get a graphical look at the difference between two files, and that's where Kompare steps in. Kompare is a graphical diff tool for KDE which allows you to compare two files side-by-side in a graphical way.

Install Kompare through your package manager if it isn't already, then launch it (it will be installed under Development).

On opening the application, you'll be asked to pick your source and destination files that you want to compare.

Kompare screenshot

There are also advanced options which you can tweak by going to the Diff and Appearance dividers on the left. If you don't need to tweak anything else at this point, however, just click Compare to open up a comparison window.

Kompare in action

As you can see from that screenshot, Kompare will by default highlight additions in green and removals in red. The colour coding allows you to easily see the changes that have been made. Also, if you've got two bits of text which are very similar but have slight changes, Kompare will highlight the changed characters in bold.

Sadly, Kompare only works with plain text files at the moment, meaning you can't use this to compare two Writer documents, for example, but if you write down notes using a basic text editor or do web design or programming of any sort, Kompare can prove very useful as a graphical shell for diff.

Avatar for peter Peter Upfold -

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: Compare two files side-by-side with Kompare

  1. # Posted on 17 June 2008 at 02:56 PM

    [...] in May 2007, I took a look at Kompare, a graphical utility for KDE which allows you to compare two files side-by-side, a bit like a [...]

Home » Articles » Compare two files side-by-side with Kompare