Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any graphical Binary Diff tool for Mac OS X? [closed]

Tags:

macos

diff

binary

Are there any Binary Diff tools for Mac OS X with a GUI? There are a gazillion text-based diff tools, but I need to compare two binary files. Essentially two Hex Editors with Dec/Hex View next to each other (the binary files are a custom file format, so not images or anything that has a more specialized diff tool)

like image 571
Michael Stum Avatar asked Oct 24 '11 05:10

Michael Stum


People also ask

Is there a WinMerge for Mac?

WinMerge is not available for Mac but there are plenty of alternatives that runs on macOS with similar functionality. The best Mac alternative is Meld, which is both free and Open Source.

How do I use diff in Terminal Mac?

It's accessed through the Terminal, so first you'll open that program from your Applications> Utilities folder. When you've got it ready to go, type diff in at the prompt followed by a space, and then drag the two folders you want to compare and drop them on the Terminal window.

How can I tell if two files are identical Mac?

Display the differences between two files, or each corresponding file in two directories. Each set of differences is called a "diff" or "patch". For files that are identical, 'diff' normally produces no output; for binary (non-text) files, 'diff' normally reports only that they are different.


Video Answer


2 Answers

I just discoverd Hex Fiend – love at first sight! Open both binary files then do File > Compare x and y or Shift+cmd+D

Hex Fiend

like image 166
Stefan Schmidt Avatar answered Sep 22 '22 15:09

Stefan Schmidt


You could store the hex of each binary in temp files, then compare them with diff. This would give you the visual hex difference.

xxd -c 1 file1 | cut -d ' ' -f 2 > file1.hex xxd -c 1 file2 | cut -d ' ' -f 2 > file2.hex  diff file1.hex file2.hex 

xxd creates a hex dump, and we're telling it to print one byte per line, then cut splits on space and compares the correct column

you could also use od instead of xxd

like image 33
Matthew Avatar answered Sep 21 '22 15:09

Matthew