Compare two files

Hi. I'm searching for software that can compare two files and find differences. Has anybody any idea?

Posted on Jun 20, 2014 4:35 AM

Reply
4 replies

Jun 20, 2014 7:42 AM in response to Matic Conradi

The OS X install includes /usr/bin/opendiff. This application expects that you have installed the optional Xcode, which contains Filemerge.app. Specifying opendiff file1 file2 in the Terminal will then launch the graphical Filemerge application with each file in its own sub-window, with graphics connecting where differences occur. Here, a comment is in one file and not another. For privacy purposes, I have excluded the filenames (and home directory) from the image.


User uploaded file

Jun 20, 2014 6:07 AM in response to Matic Conradi

A lot depends on what the files contain. If they are text files, TextWrangler, as mentioned by Barney-15E is a good choice. TextWrangler is a "Free" download, so give it a try.


If the files are not just simple Text, you may require special software.


From an the Applications -> Utilities -> Terminal session, you can use


cmp file.1 file.2


and it will tell you if the files are different, regardless of the type of file, however, it will not tell you exactly what is different.


If TextWrangler does not work for you, please tell use what kind of files they are, and maybe there is another difference tool available.

Jun 20, 2014 1:47 PM in response to Matic Conradi

diff command in Terminal for text files.

TextMate (and most other code editors) has a bundle for diff'ing open files & selections etc.

Filemerge (in Xcode) for files & folders.


Kaleidoscope is impressive for handling just about everything - http://www.kaleidoscopeapp.com

Also look at changes - http://martiancraft.com/products/changes.html


Have you heard of alternativeto.net… 🙂

http://alternativeto.net/software/kaleidoscope/?platform=mac

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Compare two files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.