Compare 2 folders to find several missing files among huge amounts of files.

Hi, all:

I've got two folders, say, "folder1" and "folder2".
Under each, there are thousands of files.

It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command.

However, if I change the above question a bit:

I've got two folders, say, "folder1" and "folder2",
under each and its subfolders, and it's subsubfolders, etc.. recursively,
there are thousands of files.

Now, I would like to compare how many files missing in each of "folder1" and "folder2", and it's better that the shell command might be able to give me some indication about where the missing files are???

Best Regards
JIA

JIA -- the first question we'd need to know is..... is the directory and file structure between the 2 directories supposed to be identical?

Presuming that the answer is "yes".... Then the answer is simple:

date > frogs

find . -print | sort > /tmp/a

/bin/rm frogs

find . -print | sort > /tmp/b

diff /tmp/a /tmp/b

This just shows the general concept. Any questions, ask away.