ls --color & LS_COLORS
From: J.A.K.E. (jake1138_at_NO.SPAM.yahoo.com)
Date: Sun, 27 Jun 2004 01:08:54 -0600
There appears to be a couple undocumented options in /etc/DIR_COLORS for use with "ls --color". These options are SUID
and SGID. If you've ever seen files with the "s" bit set for user and "s" bit set for group and they would screw up
your display because of defaulting to red or yellow background, well, here is the solution!
Just add the following lines to /etc/DIR_COLORS:
I'm using bold yellow as the text color, but you can set it to whatever you want. Hope this helps somebody out there.
It sure makes a difference when you do a directory listing on /sbin (for example), which contains some files with these
By the way, I've been looking at the source code for ls and dircolors and I can't see any reference to SUID and SGID.
Does anyone know how this works or why it's not documented?
-- Jason [ jake1138 AT yahoo DOT com ]