Is there a way, probably with Search, where you can find all the documents that have duplicates? I know search will show any document that has been duplicated. Is there any search page, scope, function, etc. that I can leverage that feature to show all duplicates in a library?
You could add the file size to the view then group by file size. The odds of multiple documents being the exact same size is rather small so anywhere you have a grouping of more than 1 is worth checking into to see if there is a duplicated file.
You want to be checking the content hash of the documents, this will show you the duplicates.
Search store these hashes, so you could look for a way of looking for duplicates of them, you could somehow use the search api to generate a list of all documents, then run an algorithm to look for duplicate hashes.
Not as a server so i can't think how the code would look.