Command to find duplicate file names recursively?

I'm trying to modify this command to find duplicate file names recursively throughout all subdirectories, but I only duplicate file names in the same directory. Currently this command finds all duplicates whether they are in the same folder or not. I want to find duplicates case insensitive... i.e. SaMpLe001.jpg and sample001.jpg would could as duplicates.


Currently I have


find / -type d -exec ls {} \; | tr '[:upper:]' '[:lower:]' | sort | uniq -d > duplicates.txt

Thanks.

MacBook Pro, macOS Sierra (10.12.3), Retina 15"

Posted on Mar 13, 2017 8:34 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Command to find duplicate file names recursively?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.