[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: case insensitive ls listing?



On Tue, 2005-03-29 at 12:17 -0500, Roberto C. Sanchez wrote:
> Quoting Kamaraju Kusumanchi <kk288@cornell.edu>:
> 
> > This is one of my long standing problems. Is there a way to make the 
> > listing of ls case insensitive?
> > 
> > for example if in a directory, I do
> > 
> > ls -someoption tem
> > 
> > it should show all the files such as
> > 
> > tem, Tem, tEm, TEm, TeM, TEM etc...
--snip--
> Set LANG in your environment to en_US (or any locale other than C that uses
> dictionary sort and not ASCII sort).

I think what the OP intended was to get ls to treat his input in a
case-insensitive fashion, not to change the way they're sorted AFTER the
lookup is done.

I think he essentially wants a shorthand way of doing 'ls
[tT][eE][mM]*', for example.

The only way I know to do this would be with find:

find . -maxdepth 1 -iname "tem*"

But that's actually MORE typing than

ls [tT][eE][mM]*

-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: