views:

520

answers:

4

I have two directories containing source files to a project I've inherited with little by way of documentation. How do I compare both directories to make see what the differences are. Thanks.

+3  A: 

You can try MELD : http://meld.sourceforge.net/ which is a wonderful visual diff tool ;-)

manatlan
Thanks a bunch- I discovered Meld belated after having posted my question and it does pretty much what I want. It would be nice if I didn't have to download the code to my local machine though as its on a remote server and (unfortunately) not checked into like CVS or Subversion.
freakwincy
+2  A: 

you may use the diff command in the shell. Or install a tool like kdiff3

Decio Lira
+1 for KDiff3. Works a treat for comparing directories (and subdirectories etc.)
Dave Webb
+2  A: 
diff -u -r dirA dirB

Will show you a unified recursive diff between the files in dirA and dirB

Bert Huijben
I believe you need the -r flag (recursive). That would then become: diff -ur dirA dirB
Jeremy Visser
Thanks. Updated answer.
Bert Huijben
+5  A: 

Try this:

diff -Naur dir1/ dir2/
  • The -u option makes the output a little easier to read.
  • The -r option recurses through all subdirectories
  • The -N and -a options are really only necessary if you wanted to create a patch file.
jcrossley3