I am looking to get a list of files in a directory in Linux, starting with a capital letter. On Unix, it's simple
ls [AZ] *
On Linux, however, I see matches that do not seem to be case sensitive:
=> ls
A.txt b.txt B.txt c.txt C.txt
=> ls [A]*
A.txt
=> ls [AB]*
A.txt B.txt
=> ls [ABC]*
A.txt B.txt C.txt
=> ls [AC] * A.txt b.txt B.txt c.txt C.txt
=> ls [b]*
b.txt
=> ls [ac] * A.txt b.txt B.txt c.txt
Running the same commands on the Unix side works as I expected. Is Linux always like this? It's easy enough to get around this with awk, so I'm not looking for a solution this way, but I wonder if I have noticed this before. Thanks in advance.
source
share