How to find file/directory names that are the same, but with different capitalization/case?

gasko peter

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
terdon

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).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to find different names of cities via several tables

From Dev

Multiple applications with different names for the same code base

From Dev

How to find different entities in the same collection with Morphia

From Dev

how to find the groups of same number and color gives the different color in MATLAB?

From Dev

How to join different tables in sqlalchemy query having same column names?

From Dev

How to find the same spec AMI in different regions?

From Dev

How do I call templates with same names at different directories in Django?

From Dev

How to compile a project with app and library in the same workspace with different configuration names?

From Dev

How do I shim executables with the same names in different directories?

From Dev

Multiple applications with different names for the same code base

From Dev

How to parse a json array with the same structure but different names

From Dev

Same type names different namespaces with Ravendb

From Dev

Execute same block of code with different variable names

From Dev

How to handle buttons with same value but different names in Spring

From Dev

Different structs with the same variable names

From Dev

How is it that the same find command can give two different results?

From Dev

How to find files with same name but different line count in two directories?

From Dev

How to find ONLY duplicate files that have different names?

From Dev

How to route api controllers with different areas and same names?

From Dev

Jaxb - How to write xml elements with different names from the same class

From Dev

How to find two different class names using find_elements_by_css_selector

From Dev

How to find out different cells from two excelsheets with the same format

From Dev

C# Struct with same members but different names, how to solve?

From Dev

How to find same filename but different content

From Dev

Different names for different objects of same type

From Dev

functions with different names but same arguments

From Dev

How can I copy multiple files in the same directory with different names but same extension in bash?

From Dev

How to find directories containing two different file names?

From Dev

How to find different rows in two tables with same columns?

Related Related

  1. 1

    How to find different names of cities via several tables

  2. 2

    Multiple applications with different names for the same code base

  3. 3

    How to find different entities in the same collection with Morphia

  4. 4

    how to find the groups of same number and color gives the different color in MATLAB?

  5. 5

    How to join different tables in sqlalchemy query having same column names?

  6. 6

    How to find the same spec AMI in different regions?

  7. 7

    How do I call templates with same names at different directories in Django?

  8. 8

    How to compile a project with app and library in the same workspace with different configuration names?

  9. 9

    How do I shim executables with the same names in different directories?

  10. 10

    Multiple applications with different names for the same code base

  11. 11

    How to parse a json array with the same structure but different names

  12. 12

    Same type names different namespaces with Ravendb

  13. 13

    Execute same block of code with different variable names

  14. 14

    How to handle buttons with same value but different names in Spring

  15. 15

    Different structs with the same variable names

  16. 16

    How is it that the same find command can give two different results?

  17. 17

    How to find files with same name but different line count in two directories?

  18. 18

    How to find ONLY duplicate files that have different names?

  19. 19

    How to route api controllers with different areas and same names?

  20. 20

    Jaxb - How to write xml elements with different names from the same class

  21. 21

    How to find two different class names using find_elements_by_css_selector

  22. 22

    How to find out different cells from two excelsheets with the same format

  23. 23

    C# Struct with same members but different names, how to solve?

  24. 24

    How to find same filename but different content

  25. 25

    Different names for different objects of same type

  26. 26

    functions with different names but same arguments

  27. 27

    How can I copy multiple files in the same directory with different names but same extension in bash?

  28. 28

    How to find directories containing two different file names?

  29. 29

    How to find different rows in two tables with same columns?

HotTag

Archive