views:

1136

answers:

6

Hello, can some one recommend a good (hopefully free) command line diff utility. I would basically need to kick it off from .Net to produce some sort of a text file with the differences between two xml files.

Thanks!

+4  A: 

Check out MSYS, it gives you diff and all the common GNU utilities on Windows.

As somebody else stated, you can also get diff and all that stuff on Windows by installing Cygwin.

Eduard - Gabriel Munteanu
the most pertinent such utility being "diff". You can also get it through cygwin, which is my preferred approach.
rmeador
+3  A: 

Not free but Beyond Compare is very good and can be driven from the command line.
It will be a well spend 30$.

... and you always can use the build in filecompare of windows, fc, offcourse.

regards,
Lieven

Lieven
if this is going to be integrated into an app, I don't think something like Beyond Compare would be a good choice (though it is a great graphical diff program). A small tool, or even better, a library, seems like the way to go.
rmeador
@rmeador, a library would indeed be better. The op asked for a command line utility though.
Lieven
+1  A: 

Well, Windows already comes with one: FC.EXE It probably isn't the best that one can find, but may be it is good enough for what you need it for.

Timo
+3  A: 

GNU utilities for Win32:

http://unxutils.sourceforge.net

tonys
+2  A: 

Plain text diff don't always manage xml nicely.

Here is an existing SO question that might help: http://stackoverflow.com/questions/430001/xml-diff-and-merge

dmckee
A: 

WinMerge always worked for me. On the other hand, if you want something lightweight extreme, ExamDiff is only one exe file. Neither of them are command line, though.

For that I would recommend just plain diff, in combination with, for example, vim and some plugin, depending on your preferences. Diff comes with unxutils, which someone already gave the link for (see above).

ldigas