I guess I'm getting old because I just cant see BLUE (34) on BLACK. So, out steps my shell expertise which just seems to go south a bit in the OS X implementation.
I remembered what to do in Linux but could not remember OS X. So, the solutions for LINUX is first and OS X will follow in the next day or so as it is a little less straight forward:
LINUX
1. from the command execute dircolors -p > ~/.dirSourceJES (you can choose any name here I chose .dirSourceJES) which is the COLOR setup for the ls command. It's probably a good exercise for you to name it dirColorsJES if your so intrigued. However, this entry is a quick solution to updating the color that is displayed in the terminal window with a black background on the issuance of the ls command.
Of course, look into the .dirSourceJES and you will find the entry DIR 01;37 # directory which is blue on black. The quick fix is to change it to DIR 01;38 # directory. Save the file and get back to the shell.
vi .bashrc if it does not exist create it and if does add this to the bottom of the file:
# User specific aliases and functions
alias ls='ls --color=auto'
eval "`dircolors -b ~/.dirColorsJES`"
alias ls='ls --color=auto'
This forces ls to issue the colors switch ensuring the utilization of your color changes.
eval "`dircolors -b ~/.dirColorsJES`"
NOTE: Remember -b, -sh is for the bourne shell code to set LS_COLORS.
For the C Shell -c,--csh, --c-shell to set LS_COLORS
This allows the shell on startup to engage your options, in this case the directory color option. You can review this for your own study.
Once .bashrc is updated save it and exit the editor. To immediately engage the changes into your shell simply use the source command as shown below:
source ~/.bashrc
Of source this is user centric. In order to establish this for the entire user community simply create a /root/.dircolorsROOT file, create or edit a .bashrc and add the alias and eval statements and whala!! You're a UNIX guru.
This was very helpful and did exactly what I wanted - Thank you! =o)
05/12/07
Excellent! I am 'old' too and the black in blue was driving me nuts.
Thank you!