Artificial intelligent assistant

How to find file/directory names that are the same, but with different capitalization/case? How can I list the file/directory names in a directory recursively that are the same, but with different capitalization/case? ex.: INPUT (not the `ls` command, the directories): [user@localhost ~/a] ls -R .: b ./b: ize Ize ./b/ize: ./b/Ize: [user@localhost ~/a] OUTPUT: /b/ize

If you have GNU `uniq`, you can sort case insensitively (`-i`), and use `-d` to print only duplicate lines:


find . | sort -f | uniq -di


As @StephaneChazelas mentioned in his answer, this might not do what you expect if you can have duplicate paths that only differ in case (like `a/b/foo` and `A/b/foo`).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8b3f3ce77186ed388f9912ab07037b53