
Sample output may look something like the following: And of course you can use a full path to the files to compare as well if need be, for example to compare an edited hosts file with another version elsewhere:ĭiff -w /etc/hosts ~/Downloads/BlockEverythingHosts.txt The -w flag can be handy for plain text files because it tells diff to ignore white space when comparing files. The basic syntax for diff at the command line is as follows:įor example, if in the present directory we want to compare bash.txt and bash2.txt, the syntax would look like the following: The diff is a command line tool, thus you must first launch the Terminal app, found in /Applicaitons/Utilities/ and then you’re ready to begin. How to Use Diff to Compare Files at the Command Line If need be you can always make a copy of the file and convert it to plain text via the textutil command line tool on the Mac, or even by using TextEdit. The diff command is available by default on the Mac, and it works the same in Linux and other unix operating systems as well, just in care you were wondering, and for Windows users it’s quite similar to how the ‘fc’ file compare tool works.įor best results you’ll want to be working with plain text files of some sort and not rich text. Open TortoiseSVN Settings and go to Diff Viewer, Advanced.Switch to Use local 7-Zip from WinMerge folder.Enable Detect archive type from file signature.Open WinMerge and go to Edit, Options, Archive Support.

Select Application specific installation.Deselect Automagic TortoiseSVN integration.

But I prefer the diff viewer that comes with TortoiseSVN and the archive diff isn’t recursive by default, so I decided to set it up manually.

WinMerge supports that, and can be integrated with TortoiseSVN very easily right through its installer. I really like the Diff Viewer that comes with TortoiseSVN, but from what I can gather it doesn’t seem to support anything but text files, which is fair enough, but I need to compare archives as well.
