Open Terminal from Spotlight or the Utilities folder
Change to the directory (folder) you want to search from (including sub-folders) using the cd command. At the command prompt type cd for example cd ~/Documents to change directory to your home Documents folder
At the command prompt, type the following command:

This method uses a simple checksum to determine whether files are identical. The names of duplicate items will be listed in a file named duplicates.txt in the current directory. Open this to view the names of identical files
There are now various ways to delete the duplicates. To delete all the files in the text file, at the command prompt type: