[CLUE-Tech] ls coloring files incorrectly

Jed S. Baer thag at frii.com
Fri Mar 7 11:29:00 MST 2003


Hi Folks.

More hot news from my continuing journey into the bowels of RH 8.0! ;-)

OK, maybe this has been the case for a while, and I dunno if I can blame
RH either.

When using ls on a symbolic link to a symbolic link to an exectable (the
new RH "management" scheme for switching between LPRng and CUPS), ls
colors the symbolic link as <green>/usr/bin/lp</green> for example,
instead of <cyan>/usr/bin/lp</cyan>, which is correct for what the file is
-- a symbolic link.

So, reading the ls man page, I see:

 -L, --dereference
 when showing file information for a symbolic link, show informa-
 tion for the file the link references rather than for  the  link
 itself

OK:
$ which ls
alias ls='ls --color=tty'
        /bin/ls

So, that isn't being set. I'm still digging, hoping to get to the point
where I can tell what the compile options are for ls in the
fileutils...RPM package.

But I thought I'd check whether anyone else sees this sort of behavior.

Oh, BTW, 'ls -F' properly colors the file as a symbolic link, so I have a
workaround of sorts, but I can't think of any reason to both '-F' and
color indications, and the colors are better for quick recognition.

jed
-- 
I wouldn't even think about bribing a rottweiler with a steak that
didn't weigh more than I do. -- Jason Earl



More information about the clue-tech mailing list