finding difference between 2 directory recursively

Hi,
i'm trying to compare two directories in Unix.
I need a recursive search ie my shell script should also compare common files in those two directory and so on...
any clues.. ??

Please elaborate as to what your ultimate goal is.

Here's one idea:

For each directory, do a "find ." and save the output to a file. In each file, strip out the first part of the path (which would be different between the two files). Cat the files together, piped to "sort | uniq -c" and save that output.

The result will be that if your output file shows a 1 before the line, then that file exists only in one of the two directories, and if a 2, then it exists in both.

ShawnMilo

do a man for dircmp
Note: you might want to send the output to a file, and also pipe it to uniq to get rid of some of the blank lines.

dircmp -s /dir1 /dir2 

dircmp -s /dir1 dir2 | uniq > outfile