Shellscript to find duplicates according to size

I have a folder which in turn has numerous sub folders all containing pdf files with same file named in different ways.
So I need a script if it can be written to find and print the duplicate files (That is files with same size) along with the respective paths.
So I assume here that same file sizes are duplicate files with different name.
Thanks.

You can try something like this:

find . -name "*pdf" -type f -exec ls -l {} \; |
awk '{
  a[$5]=a[$5]?a[$5] RS $0:$0;b[$5]++
} 
END{
  for(i in b){if(b>1){print a}}
}'

You will be better using "cksum" to decide if file content is identical.

Its a perl solution which i implemented a while before for this requirement.

finddup | Get finddup at SourceForge.net

Description: Command line duplicate file finder which finds the duplicate files by its content and not by its name. It is implemented in Perl simply, so who knows Perl can easily extend it. It is very efficient too.

Or fdupes

thanks will try the script, and let you know.