Command line diff utility [closed]

纵然是瞬间 提交于 2019-12-14 00:18:57

问题


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!


回答1:


You can always use the build in fc filecompare tool of windows but, although not free, I would recommend Beyond Compare. Besides being a very good graphical diff tool, it can be used from the command line too.




回答2:


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.




回答3:


GNU utilities for Win32:

http://unxutils.sourceforge.net




回答4:


Plain text diff don't always manage xml nicely.

Here is an existing SO question that might help: XML Diff and Merge




回答5:


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.




回答6:


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).




回答7:


I know this is an old thread, but Microsoft's XML Diff and Patch Tool works well for the use you describe:

http://msdn.microsoft.com/en-us/library/aa302294.aspx

The important difference is that it is an XML diffing utility rather than a text diff utility. Text diffing utilities will report a huge number of false positives if nodes or attributes are in a different order.

If you download the sample code, you can build XmlDiffView, which can be used to produce nice HTML reports of the differences between xml files.

I've used it to diff large numbers of app.config and web.config files, and found it handy.



来源:https://stackoverflow.com/questions/541645/command-line-diff-utility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!