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?

link|improve this question
feedback

2 Answers

Just open Utilities » Terminal.app, 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

link|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
@delvec, if this answers your question, you should accept the answer. – Doug Harris Nov 15 '11 at 16:28
feedback

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).

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.