Compare two files side-by-side with Kompare

  • May 13, 2007
  • Avatar for peter
    Peter
    Upfold

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 OpenOffice.org 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

Home » Articles »