« Vista: Still a nightmare | Main | Let's hear it for hypocrites! »

diff is one of those brilliant little utilities tucked away inside every Linux distribution. Used in its most simple form, diff original_file current_file, it will detail all the differences between two files. Pipe the output to a third file -- as in diff original_file current_file > outfile -- and open it in a GUI text editor, and you'll find the differences highlighted in different colours.

diff has plenty of options (type man diff for a list of them), but most users will prefer to use it in GUI form. In the KDE world the choice is between KDiff3 and  Kompare. Both work splendidly, but only the latter promises to "Entertain you during that boring compile." How does it do that? Well it's a little hard to explain. Let me just say that scrolling through file differences becomes something of a 3D experience due to the way Kompare highlights them...


KDiff3 and Kompare's view of the same two files. (Click to enlarge.)
Only one has natty 3D views!


In computer science terms, diff is a solution to the longest common subsequence problem. (Or see here for a more succinct explanation.)


<--Previous Hidden Linux      Next Hidden Linux -->

Comments

Yep, a good utility indeed....

Another good one (overkill for simple cases though) is Git.
http://git.or.cz/

It has an amazing amount of power in a small package! (around 2 Mb or so). I've been poking around with it for a while. You can get a long way with just 4 commands - git init, git add, git-commit, gitk (to get a graphical view of things).

I'm sold on it. Sadly, work uses Subversion... :(.

Either I'm really special or clicking to enlarge doesn't work.
All I have to do is find one for windows that is as pretty as that bottom one

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.