Softpanorama
May the source be with you, but remember the KISS principle ;-)

Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Diff and other Tools for detecting changes in sources

News

Recommended Books

Recommended Links

Reference

LCS problem Program Understanding

Some implementations

Perl-based tools
Windiff Norton Commander diff Total commander diff Examdiff Beyond Compare CSDiff

WinMerge

CompareIt
Diff wdiff dwdiff kdiff3 tkdiff Patch

 

 
Less       Admin Horror Stories Unix History Humor Etc

diff is one of the oldest UNIX commands (was included in UNIX around 1976). It compares the contents of the two files source file and target file (modified version) and produces "delta" -- lines that are changed or absent in either of files. 

It was written by Hunt and McIlroy and based on the algorithm for file comparison that they created (see  J. W. Hunt and M. D. McIlroy, An algorithm for differential file comparison, Bell Telephone Laboratories CSTR #41 (1976), PostScript (text edited from OCR, figures redrawn)).  While it is the first it is still one of the best.

Both files in a classic UNIX diff are assumed to be text files. As file difference is an illusive concept that simplest approach is consider line indivisible and compute so called "longest common subsequence of lines"(lcs). Then  anything not in this lcs is declared to belong to the difference set -- the minimal set of lines that needs to be changed for the transformation of source to the target.

But both string diff and diff based on words are definitly possible. String diff is essentially the problem that is studied in all algorithms for text file comparison as any text file can be trivially converted to the string is some alphabet with each line represented by one letter of this alphabet. Difference by word is also a trivial modification of the basic program. Essentially you first need to covert the text into "one word per line" format and then use line-based diff. Several such modifications exists (wdiff, dwdiff, see below) or can be easily written in any scripting language.

diff proved to be useful in so many cases that it is difficult to enumerate them.  First and foremost this tool is used to discover differences between versions of a text file. In this role it is useful in keeping track of the evolution of a document or of a program. For example, often, a programmer needs to debug a software program with the codebase that contains several thousand (or even hundred thousand) lines. if the problem is present only is this version and is not present in older versions then you can diff the sources and use code browsers for the difference set to try to pinpoint the source of the problem. This approach can help dramatically narrow the slice of the program that probably contains the problematic code.

It is also used as a file compression method, since many versions of a (long) file can be represented by storing one (long) version of it and many (short) scripts of transforming the older version into newer versions of the same file. Another application is so called approximate string matching used, for instance, for the detection of misspelled words.  

If we use diff for program understanding (which is comparing two versions of the program is usually about), then along with diff tools, powerful tools for source code browsing and, especially, slicers, are also necessary. Some are built into the IDE and some are standalone. The grand daddy of all slicers is Xedit  that has built-in slicing capabilities since 1970th (famous "all" command).  Among code browsers the cscope for C/C++ created by AT&T is probably one of the first useful implementations that address the problem.

diff also lead to creation of news class programs that use generation of the difference set as a part of their operation. The most popular among those is patch written by Larry Wall.  Older version control systems were little more then diff and several shell scripts.

Dr. Nikolai Bezroukov


Top updates

Bulletin Latest Past week Past month
Google Search


NEWS CONTENTS

Old News :-)\

[Jul 19, 2010]    diffstat 1.53

Diffstat reads the output of the diff command and displays a histogram of the insertions, deletions, and modifications in each file. Diffstat is commonly used to provide a summary of the changes in large,... complex patch files

freshmeat.net Project details for rsync

[»] rsync user
by Richard Harris - Aug 28th 2005 15:08:19

I am the author of Walker, a Python script for uploading sites via ftp and scp. Walker is very good for maintaining sites of moderate size, for use over slow connections, for users with limited resources, and for users who need customized control over the upload.

For some time I maintained two and three sites using Walker. Now I am maintaining over ten sites and their related project files. I use rsync exclusively, called from python and ruby scripts which handle mirrored and standardized directory structures across the sites, in other word the sites and dev dirs are all to the same pattern. In this way, I am able to easily maintain HTML, data, and cgi-bin files and to back-up and restore the web sites and the project development files.

[Mar 10, 2009] dirdiff

freshmeat.net

dirdiff is a graphical tool to display the differences(a la diff) between files in directories. Given two or more directory trees, dirdiff will display the differences between them in various glorious colors. It provides merging and the creation of patches.

[Nov 21, 2008] Linux.com Doing a diff without touching the command line

With diff-ext, GNOME users can compare and merge files from within Nautilus. If, instead, you use KDE 3, try out kdiff-ext from the same site, which works with Konqueror. Each utility handles paths to files and directories and invokes an external diff tool to perform the grunt work. With diff-ext you can easily compare two files with different names, from different directories, or whole directory trees.p

Among the major Linux distributions, the only package I could find was gdiff-ext for Ubuntu Intrepid. I'll build the program from source using version 0.3 of gdiff-ext on a 64-bit Fedora 9 machine. At the time of writing the downloads page erroneously listed 0.2.4 as the latest version of gdiff-ext. You might like to click on the "Older versions" link at the bottom of the project's SourceForge.net page to investigate what releases exist for download to verify the latest version.

To build gdiff-ext you'll need to have nautilus-devel installed on Fedora 9 or openSUSE 11.

[Jul 23, 2008] stroy 0.11.0.32 by openCage

About: stroy is a smart diff tool. It specializes in directories of files. Its differentiating feature is the ability to match files that have different names, locations, and content.

Changes: Placeholders for deleted files were added. This makes the synchronized scrolling much smoother. The old problem on Windows where files with spaces in their path wouldn't open is finally fixed. An update checker informs users about new releases. Most known bugs are fixed.

[Jul 8, 2008] dwdiff 1.4  by gphalkes

About: dwdiff is a front-end for the diff program that operates at the word level instead of the line level. It is different from wdiff in that it allows the user to specify what should be considered whitespace, and in that it takes an optional list of characters that should be considered delimiters. Delimiters are single characters that are treated as if they are words, even when there is no whitespace separating them from preceding words or delimiters.

dwdiff is mostly commandline compatible with wdiff.

The default output from dwdiff is the new text, with the deleted and inserted parts annotated with markers. Command line options are available to change both what is printed and the markers.

Changes: Unicode support was added as well as an option to treat all punctuation characters as delimiters.

[Jun 27, 2008] Meld 1.2 by Stephen Kennedy

Python-based tool.

About: Meld is a visual diff and merge tool. It integrates with most version control systems. The diff viewer lets you edit files in place (diffs update dynamically), and a middle column shows detailed changes and allows merges. The margins show location of changes for easy browsing, and it also features a tabbed interface that allows you to open many diffs at once.

Changes: Tab rendering was improved. Folder comparison was made much faster for large directories. A fatal i18n bug was fixed. UI tweaks and cleanups were made. A vc library redundancy was cleaned up. Various version control fixes were made.

[May 6, 2008] Diffuse 0.2.12 by Derrick Moser

About: Diffuse is a graphical tool for comparing and merging text files. Diffuse is able to compare an arbitrary number of files side-by-side and gives the user the ability to manually correct line-matching and to edit the files directly. Diffuse supports UTF-8 encoded Unicode.

Changes: Diffuse now provides a choice of codecs for reading and writing files. The editor has been updated to support cut-n-paste using the primary selection. The search feature now has more options.

[Mar 4, 2008] BeeDiff 1.2 by Piotr Pszczolkowski

About: BeeDiff is a graphical file comparator. It compares two text files and highlights differences in colors. The program is simple, useful, and efficient.

Changes: Drag and drop has been implemented. There are a few corrections and optimisations.

[Feb 20, 2008] BeeDiff 0.20 by Piotr Pszczolkowski

About: BeeDiff is a graphical file comparator. It compares two text files and highlights differences in colors.

Changes: Users can give paths of files to compare as parameters. Comparison statistics are displayed in a status bar. The application saves its size and position on exit. A history of compared files (combo boxes over text windows) has been implemented, which is saved on exit. A bash install script has been created that rebuilds the program and installs it in a "beediff" subdirectory of the user's home directory.

[Jan 28, 2008] Ctcompare

freshmeat.net

Ctcompare allows you to compare several sets of C or Java code trees on a token basis, rather than on a line by line basis. These programs help to identify code copying and similarities between snippets of code in both trees, even if the actual lines are dissimilar.

Release focus: Major feature enhancements

Changes:
Speed has been significantly improved, especially when there are large amounts of similarities between code trees. This release has a command line option to sort the results by the number of tokens in a run. Initial support for Java source files has been added.

Author:
Warren Toomey [contact developer]

[Dec 28, 2007] FreeDup

In case of complex files you can benefit from splitting then in chunks using the structure of the file and then work on finding differences between chunks. The preliminary step would be duplicates remover.

freshmeat.net

Freedup finds and eliminates duplicate files by linking them, and thus reduces the amount of used disk space within one or more file systems. By default, hardlinks are used on a single device, symbolic links when the devices differ. A set of options allows you to modify the methods of file comparison, the hash functions, the linking behavior, and the reporting style. You may use batch or interactive mode. Freedup usually only considers identical files, but when comparing audio or graphics files, you may elect to ignore the tags.

Release focus: Major bugfixes

Changes:
The major bugfix concerns the (n+m) assertion. Checks were implemented so that no endless loops with the extra style mp4 should occur. A minor one is to read and write the environment variable "globalkey" (-k) as letter not as ascii code. Please note that you have to correct existing environments manually. The new feature that lists the existing environments should help you on that.

[Dec 22, 2007] dwdiff

freshmeat.net

dwdiff is a front-end for the diff program that operates at the word level instead of the line level. It is different from wdiff in that it allows the user to specify what should be considered whitespace, and in that it takes an optional list of characters that should be considered delimiters. Delimiters are single characters that are treated as if they are words, even when there is no whitespace separating them from preceding words or delimiters. dwdiff is mostly commandline compatible with wdiff. The default output from dwdiff is the new text, with the deleted and inserted parts annotated with markers. Command line options are available to change both what is printed and the markers.

Release focus: Major feature enhancements

Changes:
A new option was added for showing the line numbers from the old and the new file along with an option that shows several lines of context around changes but skips large common blocks of text.

Author:
G.P. Halkes
http://os.ghalkes.nl/dwdiff.html

[Jul 16, 2007]  Meld

Written in Python, so it is customizable.

freshmeat.net

Meld is a visual diff and merge tool. It integrates with most version control systems. The diff viewer lets you edit files in place (diffs update dynamically), and a middle column shows detailed changes and allows merges. The margins show location of changes for easy browsing, and it also features a tabbed interface that allows you to open many diffs at once.

[Feb 24, 2007] Guiffy Software, Inc. - Home of Guiffy Source Diff-Merge tool.

At Guiffy our focus is Advanced Cross-Platform Diff/Merge software. Our product is a diff tool, merge tool, and folder compare tool all-in-one that makes comparing, merging, and upgrading sources as easy and reliable as possible. Guiffy is used around the world by thousands of professionals in more than 30 countries on an endless variety of platforms (Including: Windows, Linux, MacOS, and Unix). And, our downloads are packaged as InstallAnywhere kits to make setup a snap. Plus, our Support will help get you going and keep you up-to-date on our latest and greatest advances...

[Feb 24, 2007] File compare and synchronize directories utilities - Grig Software

September 1, 2006

Synchronize It! 3.2 is ready - with smart files comparison, archive bit support, file search panel and many other tweaks and fixes.
Get it!

[Feb 24, 2007] ExamDiff - Visual File Comparison Tool

ExamDiff is a freeware Windows 95/98/Me/NT/2000/XP/2003/Vista tool for visual file comparison. It has a number of simple and convenient features that many users have been asking for a long time from a file comparison tool.

ExamDiff is a part of a suite of products that includes FtpVC, an FTP based Version Control System that allows joint software development remotely over the Internet.

Key Features

[ Feb 12, 2007] Araxis Merge 2007 for Windows Preview

[Nov 10, 2006] Xfiles1.4 - file tree synchronization and cross-validation

Xfiles is an interactive utility for comparing and merging one file tree with another over a network. It supports freeform work on several machines (no need to keep track of what files are changed on which machine). Xfiles can also be used as a cross-validating disk<->disk backup strategy (portions of a disk may go bad at any time, with no simple indication of which files were affected. Cross-validate against a second disk before backup to make sure you aren't backing up bad data).

A client/server program (GUI on the client) traverses a file tree and reports any files that are missing on the server machine, missing on the client machine, or different. For each such file, the file size/sizes and modification date(s) are shown, and a comparison (using Unix diff) can be obtained. For files that are missing from one tree, `similarly named' files in that tree are reported. Inconsistent files can then be copied in either direction or deleted on either machine. The file trees do not need to be accessible via nfs. Files checksums are computed in parallel, so largely similar trees can be compared over a slow network link. The client and server processes can also be run on the same machine.

Screenshot

[Oct 3, 2006] KDiff3 - Homepage

KDiff3 is a program that

[Oct 3, 2006] DWDIFF G. Halkes' open source software projects

dwdiff is a front-end for the diff program that operates at the word level instead of the line level. It is different from wdiff in that it allows the user to specify what should be considered whitespace, and in that it takes an optional list of characters that should be considered delimiters. Delimiters are single characters that are treated as if they are words, even when there is no whitespace separating them from preceding words or delimiters. dwdiff is mostly commandline compatible with wdiff. Only the --autopager, --terminal and --avoid-wraps options are not supported.

The default output from dwdiff is the new text, with the deleted and inserted parts annotated with markers. Command line options are available to change both what is printed, and the markers.

[Sep 27, 2006] Java Notes

Dec 09, 2005 (Stuart D. Gathman) GNU Diff algorithm in Java Bug fix and setOutput for DiffPrint. I have translated the GNU Diff algorithm to a Java class. The Diff class computes the differences between two Object arrays as a list of changes. ...
www.bmsi.com/java/

[Sep 27, 2006] Linux.com CLI Magic See changes word by word with dwdiff

The dwdiff utility, written by G.P. Halkes and distributed under the Open Software License 2.0, is a front end for diff that displays a word-by-word comparison of files.

The diff utility is great by itself, and fine for programmers, but not as useful for anyone who might want to see a word-by-word comparison, rather than line-by-line.

Let's take a look at two drafts of some regular text, and see how they differ. The first example shows two drafts of the same paragraph that I've run through GNU diff, without any options. The first draft is in a text file called draft1, and the second is in a text file called draft2, so the syntax for diff is diff draft1 draft2, which gives us:

1,6c1,5
< To start with, you may need to install Tomboy, since it's not yet
< part of the stable GNOME release. Most recent distros should have
< Tomboy packages available, though they may not be installed by
< default. On Ubuntu, run apt-get install tomboy, which should pull
< down all the necessary dependencies -- including Mono, if you don't
< have it installed already.
---
> You may need to install Tomboy, since it's not yet part of the
> stable GNOME release. Most recent distros should have Tomboy packages
> available, though they may not be installed by default. On Ubuntu,
> run apt-get install tomboy, which should pull down all the necessary
> dependencies, including Mono, if you don't have it installed already.

That's not very useful when it comes to trying to see what has changed. Because of the way that regular text is formatted, when you make a change in one line of text, the odds are that it will affect the next line, and the line after that, and so on. So, plain ol' diff just doesn't cut it.

Let's take a look at what happens when we use dwdiff instead. The syntax for dwdiff is the same; just run dwdiff draft1 draft2:

[-To start with, you-]{+You+} may need to install Tomboy, since it's not yet part of the
stable GNOME release. Most recent distros should have Tomboy packages
available, though they may not be installed by default. On Ubuntu,
run apt-get install tomboy, which should pull down all the necessary [-dependencies ---]
{+dependencies,+} including Mono, if you don't have it installed already.

Text that has been deleted is enclosed in brackets with a minus sign, and text that has been added has been enclosed in braces with a plus sign. Dwdiff's output is much easier to read when you're working with prose rather than code.

Another way to view the text is to use the --less-mode option, which will provide markup suitable for viewing in less. Instead of using brackets and braces to denote changes, text that has been added will be displayed in bold, and text that has been removed will be displayed with an underscore. This may vary, depending on your terminal emulator -- in my use of dwdiff, the bold text shows up just fine in an xterm and GNOME Terminal, but doesn't show up properly in Konsole.

The dwdiff utility also supports a color mode, which displays redacted text in red and additional text in green. The syntax for color is dwdiff -c draft1 draft2.

In the example, you can see that the word "you" is actually common to both files -- the only difference is that the phrase "To start with," has been removed and "you" has been capitalized because it's now at the beginning of the sentence.

While case-sensitivity is often important for programming, you may want to overlook case when looking at documentation or a short story. To do that, you can use dwdiff's -i option (longer version, --ignore-case), which tells dwdiff to ignore case when comparing words.

Just the facts

I like to see changes in context, but if you prefer to see changes by themselves, dwdiff has the --no-common option, which tells dwdiff to print only the words that have changed between files. The short version of the option is -3. For example, running dwdiff -3 draft1 draft2 provides a much more concise report:

======================================================================
[-To start with, you-]{+You+}
======================================================================
 [-dependencies ---]
{+dependencies,+}
======================================================================

If you'd like to shorten that even further, you can use the --no-deleted option, which tells dwdiff to omit words that were deleted from the first file. The short option for --no-deleted is -1. Using dwdiff -1 -3 draft1 draft2 provides output like this:


======================================================================
You
======================================================================

dependencies,
======================================================================

To omit words added to the second file, you can use the --no-inserted option. The short option for that is -2.

You may be less interested in specific changes than seeing just how much has changed between versions of a file. To see the word count and percentage changed between two files, use the -s option, which produces output similar to this:

old: 1662 words  1597 96% common  10 0% deleted  55 3% changed
new: 1666 words  1597 95% common  13 0% inserted  56 3% changed

This gives us the word count of the original file and the new file, how many words are in common, the number and percent deleted from the original and the percent and number inserted in the original.

The dwdiff utility uses diff, and you can pass some options to diff using dwdiff's -D option to change the way diff behaves -- so long as that doesn't change the output coming from diff. The syntax for this is dwdiff -D-option file1 file2, so the diff option is included directly behind the -D option for dwdiff.

For instance, diff has an option (-y) to display changes side-by-side. This won't work with dwdiff, because it throws off the formatting that the program expects. You could, however, pass options like diff's -d option, which tells diff to use a different algorithm to find fewer changes. This will affect diff's behavior, but not the format of its output.

Note that dwdiff is not the only game in town. The GNU wdiff utility is another front end to diff that produces word diffs between files, and the options for wdiff are similar, but dwdiff has a few different features.

The dwdiff utility is the only word diff utility with color support, and it also provides support for specifying characters to be treated as whitespace or as delimiters. To specify a character to be used as whitespace, which is ignored, use the -W option.

Delimiters are characters that are treated as words, even if they're not separated by whitespace. Specify delimiters using the -d option -- so if you want to specify a semicolon as a delimiter, you'd use dwdiff -d \; file1 file2. In this case, you need to escape the semicolon using the backslash (\) character so that it's not interpreted by the shell.

If you spend any amount of time comparing text files, I'd suggest installing dwdiff and testing it out. It's a handy tool to have alongside the traditional diff utility, and makes spotting changes in text files easier.

[Mar 8, 2006] Linux Today - Linux Forums Using diff and patchby Scott Robbins

"The diff and patch utilites can be intimidating to the newcomer, but they are not all that difficult to use, even for the non-programmer. If you are at all familiar with makefiles, you might find yourself frequently wanting to patch a file, either to correct an error that you've found or to add something that you need to the makefile.

"After I began using the mrxvt terminal, I wanted to give it Japanese capability. My main O/S is FreeBSD..."

Complete Story

Related Stories:
SearchOpenSource: Patch Work Management: Keeping the Pieces Together(Feb 28, 2006)
Editor's Note: Diagnosing the Linux Body(Feb 28, 2004)
Linux Journal: The Kernel Hacker's Guide to Source Code Control(Aug 21, 2002)

[Feb 24, 2006] ExamDiff - Visual File Comparison Tool

Current released version is 1.6n (February 24, 2006). You can download it from these links.

Key Features

The full feature list can be found here

[Feb 20, 2006] freshmeat.net Project details for Meld

Meld is a visual diff and merge tool. It integrates especially well with CVS. The diff viewer lets you edit files in place (diffs update dynamically), and a middle column shows detailed changes and allows merges. The margins show location of changes for easy browsing, and it also features a tabbed interface that allows you to open many diffs at once.

[Jul 25, 2005] Welcome to the Steve Oualline WEB Server

pdiff_v1.tar  pdiff.pl - a three way diff/merge tool written in Perl 

Merge tools

Ever tried to keep up, on an hourly basis, with two other developers? Each of you is working in your own branch. One is doing far-out research. One is doing the next stable release. One is doing the current stable release. Never seriously used X-windows or emacs? Where do you compromise your development-style principles? When you're faced with 300,000 lines of code, and daily merges [that took one developer only one hours' work] are cut from six hours to 30 minutes. Enter dirdiff.

So you use vi, linux-console-mode with six 80x60 screens, diff, patch, ctags and grep. Get a life and use emacs? No thanks. tried it. Was told that it didn't have different modes for text-editing and text-entry, it was better all-round. Had this wonderful thing called emerge, it could solve all my problems of how to do, as Jeremy Allison described it from over a year ago, "The MFH (tm)" - The Merge From Hell.

One Samba team member had already tried, and failed. To give you an idea of the size of the task, the diff file between the stable Samba 2.0 tree and what is now the Samba TNG tree (The Next Generation), was 7 megabytes, and that was six months ago.

Two and a half years ago, the NT Domains for Unix project started, with Paul Ashton's "Welcome to the SAMBA Domain" work. Since that time, when the Samba source was only 150,000 or so lines of code, both the stable Samba 2.0 production release tree and the TNG branch added an extra 50,000 lines of code - each. Fortunately, as it turns out, the majority of the work in each branch was done in totally different areas. The remaining areas are a nightmare to merge, and a pain in the wrists to keep up-to-date on a daily basis.

So, what tools were available? Well... emerge. Except that means, emacs. Eventually, I cornered someone, late on a Friday, for instructions on how to use emerge. and emacs. Starting with one file, it quickly became obvious that this simply wasn't going to cut it. Press a, b, b, ab OOPS urr, Paul, how do I get out of this, to which the response was, "'Bye, have a good weekend". to which my response was, "Ctrl-c, argh, ctrl-d, ARGH, ctrl-z killall emacs".

If people laugh at me for using an editor that causes me to press keystrokes such as mx:0d'x and yyP in notepad and pine, I will respond, "and what's emerge, then?"

The very same Paul (who is going to kill me for this article, he really doesn't want any more maintainer-request-email than he already gets) is a fan of tcl and wish. In a former existence, instead of abandoning a really large tcl script in favour of a better, faster language, he wrote a code-optimiser for tcl.

One of his tools that he has written in tcl is dirdiff. dirdiff, in a previous incarnation, was able to show you one window with a comparative diff of two or more directories, and you select one file from two of thoes directories and it shows you the differences. If you liked one file better than the other, you could select the "copy" menu to copy one file over the other. Great for getting rid of all those pesky little mods by another developer that you never really liked, anyway, their code always got in the way of yours.

Anyway.

dirdiff-previous-life showed up the different lines in pretty colours. To give you some idea, take a straight diff (diff file1.c file2.c). If there's a <, display that bit in red. If there's a >, display that bit in green. Insert red bits and green bits on-screen in amongst a bit of context before and after, and voila, that's a dirdiff file display. Then someone (I forget who) thought, you know, it would be really good if i could clickety-click on da red bit or da green bit, and it goes into one of the files...

*Fortunately*, Paul *also* needed something like this, as he needed to merge three sets of pppd branches, and so rather than spend time manually going back to diff and patch, he set about adding little windows all the way down the left-hand-side of dirdiff's file display, one for each line of the read bits and green bits. This means that if the diffs are large, wish gets *really* pushed to the limit: that's a lot of little windows. Tell you what, though: I don't care if it's slow, it saves me that much time. And Paul's speed-optimisations help a lot.

So, how do you use the new, improved, dirdiff? Well, at an xterm, you type:  

dirdiff ~/samba-tng/source/smbd ~/samba-main/source/smbd &
and up comes a windows with all the files that are common between the two directories. select a file, and you get a dirdiff file-window, with red bits and green bits, and on each red bit and green bit, there is a series of buttons at the left. If you want to make a "change", you select a button, with left-mouse. If you want to make a "group change", use right-mouse and an entire group of buttons will select or deselect. Having selected all your "changes" you wish to make, from the menu, you then select the file to which all the "changes" are to be applied. Behind the scenes, this creates a straight-diff patch file, which is then applied to the file you selected. The result: only the "changes" you selected are made to the file. Hit "Rediff", and wow, you have less differences between the two files than when you started.

To give you some idea of the speed at which this can be done, I use dirdiff by positioning the mouse cursor (IBM thinkpad nibble-thing) over the left-hand-set-of-buttons, then rapidly press down-arrow on the keyboard (about 3 or 4 times a second), interspersed with either right-mouse or left-mouse clicks *without* changing the position of the mouse. In this way, a 3,000-line file with... 50 to 100 sets of diff-style modifications can be updated in about two minutes, especially if you've already gone over exactly the same files about once every two days, for the last three weeks, and you know pretty much instantly the bits that you want to keep and those that you recognise were added by someone else, very recently.

I wasn't kidding about taking six hours to merge one hours' work by another developer, using diff and patch. I wasn't sure exactly which files in which directories had been modified (about ten, out of about a hundred files), and so had to check the whole lot... again, having just spent 48 hours manually merging an extra 70,000 lines of smbd code into the Samba TNG branch. Now, using dirdiff, it's a pretty trivial task to keep up-to-date. I still have to do cvs diff -d -u -w -b -B > diff.output and check the output, before committing... just to make absolutely sure.

I hate X-windows. I think it's a complete waste of a good computers' time to run graphics. You can't edit two files and press alt-f1,f2,f1,f2 page-down f1 page-down, alt-f2,f1 page-down f1 page-down to compare two files, and even if you could, they would be displayed in some stupid variable-width font. [I use this console-screen-switch technique *as well as* diff, quite frequently: the human eye works by detecting changes, and they show up *really* well when you do this, *especially* when doing comparative hex-dumps of Windows NT Network traffic and corresponding Samba Network traffic to find out the exact, unknown, undocumented bit-patterns that *might* be the cause of a major lack of functionality in Samba - SMB is like that...].

So what caused me, who on receipt of a .doc or .xls file will resort to running strings on it in order to deduce its contents, or sends it to someone else for printing, even if it's confidential, to use graphical interfaces?

dirdiff.

http://samba.org/cgi-bin/cvsweb/dirdiff

SeeDiff

SeeDiff is a graphical diff utility that shows the differences between directories and their
files,
based on the SeeSoft representation.

SeeDiff can display the output of diff recursively applied to directories and their subdirectories.

http://www.bell-labs.com/user/tball/SeeDiff.html

The WDVL Introduction to UNIX for Web Developers Table of Contents by Selena Sol

CTC Software Documentation gdiff

sdiff
 

Debian GNULinux -- tkdiff

TkDiff is a graphical front-end for the standard Unix diff utility. Not bad but its impossible to change files and set parameters like -dbB. See also tkCVS, a graphical front-end to CVS.

egrep

Integrating noninterfering versions of programs

The WDVL Introduction to UNIX for Web Developers Table of Contents

emacs Comparing Versions

 ediff, developed by Michael Kifer, is a visual interface to diff and patch, accessed within emacs, that highlights the differences between two files in color. It features:

Ediff is part of the standard Emacs and Xemacs distribution.

Periodic updates are available at:
ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer

  1. mgdiff, developed by Daniel Williams, is a graphical front-end to diff. When the user selects two files for comparison, it runs the diff command, parses the output and presents the results graphically. This presentation can also be used to generate a user-specified merge of the two files into a third file.

    This program's appearance is based upon a program called gdiff, available for Silicon Graphics workstations.

    The latest version of mgdiff is available for ftp at:

    ftp://ftp.x.org:/contrib/applications/mgdiff.tar.gz

  2.  tkdiff, developed by John Klassa, is a graphical front-end for the standard Unix diff utility, based on Tcl/Tk. Its features include:
    • Highlighted difference regions;
    • side-by-side viewing of files;
    • linked (synchronized) scrolling of the two files;
    • random access to difference regions.
    The latest version, 1.0b9, is available at:

    ftp://ftp.neosoft.com/languages/tcl/alcatel/code/tkdiff-1.0b9.tar.gz

  3. xdiff, developed by Paul Lucas, is another graphical diff tool based on the SGI gdiff utility.

    It is available at:

    ftp://ftp.best.com/pub/pjl/software/xdiff-1.1b3.tar.gz

  4. tkxcd, is a diff front end that has a look and feel similar to Atria ClearCase's xcleardiff.

    Available at:
    ftp://ftp.redhat.com/pub/contrib/RPMS/tkxcd-1.1.0-1.i386.rpm
    ftp://ftp.redhat.com/pub/contrib/SRPMS/tkxcd-1.1.0-1.src.rpm

TestWorks for Unix EXDIFF System

EXDIFF from Software Research Inc [pid 16168]-[vid 1357]

Recommended Links

Softpanorama Top Visited

Softpanorama Recommended

Keith Devens .com - Differencing programs

Diff - Wikipedia, the free encyclopedia

Comparison of file comparison tools - Wikipedia, the free encyclopedia

Free File Comparison and Differencing Utilities (Text files, Binary files, Diff Utilities) (thefreecountry.com)

DiffUtils for Windows

Tkdiff - TkDiff is a graphical front-end for the standard Unix ...

[Wikitech-l] wikipedia diff tool

Jonathan D. Nolen - Wiki diff

John Resig - Javascript Diff Algorithm

Reference

Solaris 9 diff manpage

Diffutils - GNU Project - Free Software Foundation (FSF)

Windiff

How to Use the Windiff.exe Utility (Microsoft)

WinDiff - Wikipedia, the free encyclopedia

WinDiff (or WinMerge), the way you want it! - The Code Project - Shell Programming

Keith Devens .com - Windiff

Download windiff.zip. Contains windiff.exe, windiff.hlp, and gutils.dll.

I'd recommend checking out other differencing programs.

 

Some implementations

dwdiff

DWDIFF G. Halkes' open source software projects

dwdiff is a front-end for the diff program that operates at the word level instead of the line level. It is different from wdiff in that it allows the user to specify what should be considered whitespace, and in that it takes an optional list of characters that should be considered delimiters. Delimiters are single characters that are treated as if they are words, even when there is no whitespace separating them from preceding words or delimiters. dwdiff is mostly commandline compatible with wdiff. Only the --autopager, --terminal and --avoid-wraps options are not supported.

The default output from dwdiff is the new text, with the deleted and inserted parts annotated with markers. Command line options are available to change both what is printed, and the markers.

Guiffy Software, Inc. - Home of Guiffy Source Diff-Merge tool

Guiffy SureMerge is the diff/merge built into Seapine's Surround SCM and Visible Systems' Razor SCM.

ExamDiff - Visual File Comparison Tool

Current released version is 1.6n (February 24, 2006). You can download it from these links.

Key Features

The full feature list can be found here

Perl-based tools

AlgorithmDiff - Compute `intelligent' differences between two files - lists - search.cpan.org

Span -- a module for computing the difference between two files ...

Diff - Compare two files and print differences

Araxis Merge

Araxis Project Management & File-Folder Comparison

  • Araxis creates software that enables you to take control of your work and be more productive. Araxis products are used worldwide by tens of thousands of professionals.

    [More about Araxis]

    Products

    Legacy: [Read More Araxis News | Subscribe to the Araxis News Feed]

    ExamDiff

    [Feb 24, 2007] ExamDiff - Visual File Comparison Tool

    ExamDiff is a freeware Windows 95/98/Me/NT/2000/XP/2003/Vista tool for visual file comparison. It has a number of simple and convenient features that many users have been asking for a long time from a file comparison tool.

    ExamDiff is a part of a suite of products that includes FtpVC, an FTP based Version Control System that allows joint software development remotely over the Internet.

    Key Features

    Beyond Compare

    Beyond Compare - The file compare, folder compare and remote directory compare utility from Scooter Software

    Beyond Compare®, the advanced file and folder comparison utility for Windows, helps you visualize changes in your code, keeps your directories in sync, and validates copies of your data.  More...

    Start your free 30-day trial now to see what Beyond Compare can do for you.

    CS Diff for Windows

    Stop making guesses at what's changed between two files--discover the CSDiff difference!” - (Lockergnome's Windows 95 / NT E-Zine, issue #49)


    ComponentSoftware Diff (CSDiff) is a free, advanced file-difference analysis tool for Microsoft Windows.

    New Release: CSDiff v5.0
    CSDiff v5.0 has been released. Click here to read more and download your copy now !!

    Read the highlights of CSDiff

    See the CSDiff screenshots

    Download CSDiff - for FREE !!

    WinMerge

    WinMerge is an Open Source visual text file differencing and merging tool for Win32 platforms. It is highly useful for determing what has changed between project versions, and then merging changes between versions.

    Compare It

    Compare It! 4 preview

    One of the main features of upcoming version 4 of our file comparison tool will be support for alternative integrated viewers\editors.

    To implement this feature we had to redesign internal structure completely, that's why we hope you can help us by heavy testing of current version.

    Download latest update here, 650Kb.
    Discuss it here.


    Etc

    Society

    Groupthink : Understanding Micromanagers and Control Freaks : Toxic Managers : BureaucraciesHarvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Two Party System as Polyarchy : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

    Quotes

    Skeptical Finance : John Kenneth Galbraith : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Oscar Wilde : Talleyrand : Somerset Maugham : War and Peace : Marcus Aurelius : Eric Hoffer : Kurt Vonnegut : Otto Von Bismarck : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Oscar Wilde : Bernard Shaw : Mark Twain Quotes

    Bulletin:

    Vol 26, No.1 (January, 2013) Object-Oriented Cult : Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks: The efficient markets hypothesis : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

    History:

    Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

    Classic books:

    The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

    Most popular humor pages:

    Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

     

    The Last but not Least


    Copyright © 1996-2014 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine. This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

    You can use PayPal to make a contribution, supporting hosting of this site with different providers to distribute and speed up access. Currently there are two functional mirrors: softpanorama.info (the fastest) and softpanorama.net.

    Disclaimer:

    The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

    Last modified: February 19, 2014