ls --color & LS_COLORS
From: J.A.K.E. (jake1138_at_NO.SPAM.yahoo.com)
Date: 06/27/04
- Next message: Edmund White: "Re: Poor HP Proliant RAID performance"
- Previous message: Bats: "Re: Strange characters with pstree and ncurses apps -- i18n problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
SUID 01;33
SGID 01;33
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
bits set.
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 ]
- Next message: Edmund White: "Re: Poor HP Proliant RAID performance"
- Previous message: Bats: "Re: Strange characters with pstree and ncurses apps -- i18n problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]