Colored directory listings on Mac OS X

Update: I am reposting these instructions from my retired other blog, www.darnteuton.com, since others are linking to the post and I am noticing tons of hits in my log files. When first setting this up, I was using Mac OS 10.3 and it worked like a charm. Now I am running Mac OS 10.5.4 and it still works great. So enjoy!

Here are the steps required to get beautiful colored directory listings under Mac OS X.

  1. Get “fileutils” from fink:
sudo apt-get update
sudo apt-get install fileutils
  1. Copy this file to your home directory and rename it to “.dircolors” and edit it to your liking.

  2. Make an alias for the command “ls” by editing your “.tcshrc” (assuming your shell is tcsh):

eval `/sw/bin/dircolors -c ~/.dircolors`
alias ls ‘/sw/bin/ls -F –color=auto’

Voila! That’s it. Just restart Terminal or source your modified “.tcshrc”:

source .tcshrc

Related Posts
GTD and Thunderbird...