Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's my deal in a nutshell:

I use a Macbook and a PC, where I sync 2-3 large folders between the two with Windows Live Mesh.

About 5 days ago my Macbook battery died, and I just upgraded to a Macbook Pro. Upon running Windows Live Mesh, it gives me an error that I worked on for a day and couldn't figure out. I need file syncing so I decided to upgrade my Dropbox account to 50GB.

However, my Windows PC surely has a handful of files that have been updated in that period, plus I have used my Macbook Pro to edit a few files within these folders before I upgraded Dropbox.

Last night I moved all the synced folders on my Windows PC to the Dropbox and let that sync to my Macbook overnight. Now I have the Mac version of the synced folders on my desktop, and the Windows version of the synced folders in my Dropbox.

Is there a way to compare the contents of these two folders on my Macbook Pro to determine which files have been changed, and which folder contains the most recent version?

share|improve this question

Just open Utilities », and use the diff command to compare two folders.

For example, if you have the contents:

  • test1

    • file1
    • file2
    • file3
  • test2

    • file1 (modified)
    • file3

The command diff test1 test2 will output:

Only in test1: file2
Binary files test1/file1 and test2/file2 differ

This way you can see which files are different from each other (in a "binary" way, e.g. changed contents), or which files don't exist in either folder. You can pass the -r option to recursively search subdirectories, and read man diff for more details.

In your case, that would be something like: diff -r ~/Desktop/Dropbox ~/Dropbox

share|improve this answer
Sweet, i was just looking up this command but wasn't sure if it was only for added files or changed contents as well. Thanks! – delvec Nov 12 '11 at 18:55

If you install the OS X development tools (through app store or on a disk that came with your computer), you can use the FileMerge app – also launchable through the command utility opendiff.

enter image description here

There's an intro with screen shots in this blog post (not my blog, just found it through Google).

share|improve this answer
That's nice, I somehow forgot about this – should be easier for people who like to work in the GUI. – slhck Nov 15 '11 at 16:48

Compare Folders is the best program that I have found for this task. It's very easy to use and with a simple GUI.

Its trial allows you to do 9 free comparisons.

share|improve this answer
Consider adding more information about the linked program so that the post remains useful should the link become invalid. In addition, if you have an affiliation, please disclose it so that this isn't seen as spam. – bwDraco Oct 8 '12 at 5:23
I'll let this stay for the moment, but please read: How do I recommend software in my answers? – slhck Oct 8 '12 at 7:49
eh I didn't know there was a limitation. Had it for years – space_balls Oct 12 '12 at 4:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .