File structure comparison

To test server migration, we need to compare files under a directory in source and target servers.

I need to verify if the below two directories on two servers are identical (i.e., contains same directories and files with same size. They may have multiple level sub-directories)

//SourceServer/project1/nesteddir
//TargetServer/project1/nesteddir

Has anyone done a similar stuff?

The output of diff command is quite complex to understand. Is there any other simple way?

Do on both servers/directories something like for example:

find . -exec ls -la {} \;| awk '$NF !~ /^\.$|^\.\.$/ {print $5,$NF}' > outfile1

For $5 you have to check which position your filesize will be when you do a ls -l, ie. if it's the 5th column like in my example.
And then compare both with diff like

diff outfile1 outfile2

Thanks zaxxon, but the problem is in using diff command. I need a simple output like

The following files are in serverA but no in serverB :

The following files names are common to serverA and serverB, but contents differ:

Thanks again for your response.

Hi.

If you are on Solaris, there is a script dircmp that may be useful:

dircmp - no version provided for /usr/bin/dircmp.

And otherwise, there is a script at: Unix Review > The Shell Corner: cmptree that discusses a similar script.

Because both are scripts, you and your colleagues can modify them to suit your purposes ... cheers, drl