Hidden Linux : Spot the diff
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 -->

PC World is New Zealand’s top selling computing and technology magazine.
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... :(.
Posted by: Andy | October 24, 2008 11:58 PM
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
Posted by: Nigel | October 24, 2008 4:24 PM