MacDiff is a file-comparison program for Mac OS X, which I wrote in about 1,400 lines of
Java. It can compare two individual files, or it can recursively compare all the files
in two directories (including subdirectories).
MacDiff is not a text-comparison program – it doesn’t compare two text files line by line. Instead, it compares the following items:
Sizes – The number of bytes in each file.
Modified dates – The date when each file was last modified.
The program can ignore .DS_Store files (hidden files created by OS X to store custom attributes of a folder,
such as the position of icons or the choice of a background image), and can write the comparison results to a text file for later inspection.
The stat OS X command line utility is used by MacDiff to obtain the UNIX
filetype and access permissions for each file, and the mdls utility is
used to obtain all the metadata that Spotlight has stored about each
file (see this article for more information). MacDiff can be told
to ignore certain metadata attributes (such as LastUsedDate) if they are causing an unhelpfully large number of file differences to be reported. Below is a list of the metadata attributes
that MacDiff can compare: