Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
According to General Linux I (Exam Cram) by Dulaney pg 17, ls -d [a-z]* should only display files that begin with a lowercase letter. I've also tried [A-Z] as you can see. According to Dulaney they should behave differently given the files I'm trying to list but they don't.
----------------
$ ls -d [A-Z]*
Desktop DIR_COLORS Documents Junk JUNK junk1 Music Pictures Public Templates Videos
$ ls -d [a-z]*
Desktop DIR_COLORS Documents Junk JUNK junk1 Music Pictures Public Templates Videos
----------------
As a side note, is the Dulaney book helpful in passing the LPI Gen. Lin. 101 exam? I've been using Linux at home for years and am fairly familiar with bash which I'm using now.
Regards, Tom
p.s. Great site! I just signed up.
Created a test account, blasted away the .bashrc file, and still same results.
[code]test@the-haystack:~$ ls -l .bashrc
-rw-r--r-- 1 test test 1 2008-09-03 02:30 .bashrc
test@the-haystack:~$ mkdir test TEST
test@the-haystack:~$ ls
Examples test TEST
test@the-haystack:~$ ls -d [a-z]*
Examples test TEST
There are some shopt settings for case sensitivity in glob patterns, nocaseglob and nocasematch. For some reason on Ubuntu, these have no impact on the OP's command... Looks like an Ubuntu bug to me.
Thanks to all of you. I read every word. Hey Chris, thanks alot for the link to gnu.bash.bug. I guess it's logical but unconventional, I think. However, perhaps it's conventional among programmers. That question is an interesting departure point on human communication and how we change registers (Linguistic term I think) depending on the group we're communicating with at the moment.
Regards, Tom
My default locale settings (specifically LANG) are
en_US (with LC_COLLATE=C), and the "normal" behaviour
occurs. I've also checked on a machine running SLED
with LANG=POSIX and LC_CTYPE=en_US.UTF-8 being the only
locale relevant settings, same thing. On an Ubuntu box,
as soon as I set LANG=POSIX, ls output becomes "normal"
(in other words as I've been used to for the last 11
years ;D) ... won't spend much time on researching it
further, though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.