Re: Question about the --color option of ls
* M.PITZL@gmx.net <M.PITZL@gmx.net> (2001-07-18 12:10):
> how does this color feature of ls work?
> If i make an alias like ls='ls --color' the output of ls is colored in some
> way.
> It colores executable files, subdirectories and symbolic links.
> As far as i have seen yet, there's a file called DIR_COLORS under /etc/
> where a lot of more color stuff is configured. But ls doesn't color things like
> .tgz files although this type of file is configured in the DIR_COLORS file.
> Any hint why this doesn't work for me or some advice what i should change?
You're probably not using the /etc/DIR_COLORS by default. Try adding
"eval `dircolors -b /etc/DIR_COLORS`" to your ~/.bashrc and log out
and in again.
I find its easier to run "dircolors -p >~/.dircolors" and then add
"eval `dircolors -b ~/.dircolors`" to my .bashrc and then make all
changes to ~/.dircolorsi (instead of the system-wide /etc/DIR_COLORS).
Probably more pertinent on a multi user system, but good policy
nevertheless.
Cheers,
Sean
--
Sean Quinlan (smq@gmx.co.uk)
Reply to: