[CentOS] Maybe OT : strange wildcard behaviour

Sun Oct 24 09:39:20 UTC 2010
Niki Kovacs <contact at kikinovak.net>


I'm currently working through some basic HOWTOS (Linux Fundamentals 1-4
by Gentoo founder Daniel Robbins) on a CentOS 5.5 server, just to keep
in shape.

I've just noticed a curious wildcard behaviour, which I can't really
explain. Let's say I wanted to list all the files or directories in /tmp
starting with any uppercase character. Normally, I would do this :

$ ls -d /tmp/[A-Z]* 

Curiously enough, this command lists *all* the content of /tmp,
consisting of a majority of files and directories starting with a
*lowercase* character. I've tested this on two different machines, with
the same results. I'm puzzled.

Can anybody offer an explanation for this curious behaviour ?