How to compare files in 2 directories?

Hi,

I want to compare the content of 2 directories and list down both the duplicate and unique files from each directory. Tried to use diff but but not able to achieve the result.

For example,

DirA
FileX
FileY
FileZ

DirB
FileY

The desired outcome is
Duplication: FileY
Unique: FileX FileZ

Please help. Thanks

Have you tried diff command yet?