PDA

View Full Version : Colored ls



gatorparrots
03-16-2003, 04:32 PM
Color can be added to any shell with a ~/.dir_colors file and with color ls (part of the GNU fileutils package).
You can get a pre-compiled binary of fileutils here:
http://homepage.mac.com/rgriff/

Emrys
03-16-2003, 05:01 PM
Tried both the dircolors command and making a .dircolors file, and neither worked.

gatorparrots
03-16-2003, 05:13 PM
Did you install fileutils?

Attached is my .dir_colors file (it's too lengthy to post the contents here).

Emrys
03-16-2003, 09:26 PM
Yes, I did the 'fink install fileutils' and it went through the install, and everything seemed to compile all right. Wonder what I'm missing here... I used your .dir_colors file as well...

gatorparrots
03-17-2003, 04:30 AM
rehash
and
source ~/.tcshrc
or
source ~/.cshrc
(whichever is appropriate for your configuration)
Then try an ls ~. You should be seeing color!

Emrys
03-17-2003, 11:45 AM
Nope no color....

Did rehash

And source ~./cshrc

gatorparrots
03-20-2003, 06:52 PM
Originally posted by gatorparrots@Mar 17 2003, 08:29 AM
rehash
and
source ~/.tcshrc
or
source ~/.cshrc
(whichever is appropriate for your configuration)
Then try an ls ~. You should be seeing color!
I had forgotten to tell you to append this line to your ~/.*cshrc file:
eval `dircolors -c ~/.dir_colors`
An easy way to add it in place would be:
echo "eval `dircolors -c ~/.dir_colors`" >> ~/.cshrc
Which is why you need to source it in the first place!
source ~/.cshrc