You can use a utility like fdupes or rdfind to list duplicate files. For example:
fdupes --recurse dir1 dir2
You might also want to use the --sameline flag to list all duplicates on the same line, rather than in text blocks, depending on how you want to parse the results.