export LS_COLORS='di=01;33'
Other good colors for directories are bold white (01;37) and bold purple (01;35). You can find a complete table of ANSI colors in many places; The Linux Documentation Project's list is one such place.
|
|
|
If you run Terminal.app with a black background and a color 'ls' command, directories (in bold blue) can be hard to see. You can change the color of directories with an export LS_COLORS command. For example, to make all directories yellow, add this to ".bash_profile" in your home directory:
Other good colors for directories are bold white (01;37) and bold purple (01;35). You can find a complete table of ANSI colors in many places; The Linux Documentation Project's list is one such place.
•
[36,873 views]
Hint Options
Change 'ls' directory colors
Hmm.. didn't work for me. Couldn't find the export command.
Change 'ls' directory colors
"couldn't find export command" probably means you're not using bash. In that case, add
set LS_COLORS='di=01;33'to your .tcshrc. However, it didn't work for me either, and I am using bash.
Change 'ls' directory colors
The correct command for tcsh
setenv LS_COLORS='di=01;33' For sh/bash LS_COLORS='di=01;33' ; export LS_COLORS Cheers!
Change 'ls' directory colors
adding "setenv LS_COLORS='di=01;33'" to my .tcshrc file didn't do anything, even after restarting Terminal.app (I use tcsh).
Change 'ls' directory colors
not did "setenv LS_COLORS 'di=01;33'" work
Syntax depends on your shell
The instruction assume you are using the bash shell. In the default (tcsh) shell, the command you want is:
Change 'ls' directory colors
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:*.mpg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:
Change 'ls' directory colors
I tried the tcsh equivalent in my .tcshrc, but it didn't do anything.
Change 'ls' directory colors
For those that aren't getting this to work, you probably need to add an alias to your startup files along the lines of:
Change 'ls' directory colors
Jennifer (jyncroft) is right. or for the adventurous, compile the Gnu fileutils 4-1. It is easy, and will give you some experience compiling (with the Dev tools installed and with the idea that you might want to discover what the package installs and then backup all your old utils first).
All of the comments on this add up to the fact that: As far as I know... the version of ls which ships with Mac OS X does not support the 'color=auto' command which you need to invoke when you are using ls. The version in the GNU tools ( search for fileutil in google ) includes that capability. This information has been provided in some hints previously on this web-site. Fileutils also includes a small script that you can use to automatically set your environment variable it is called DIRCOLORS and you can make it executable and then setenv LS_COLORS 'path/to/DIRCOLORS'
this is desirable because a nice set of color choices may end up being a very long list.
If you just want to get away from the default blue for directories try to find the correct way for your shell in the other comments in this section. so find a copy of color_ls (for example: -HERE- and check which shell you are using and you too, can have an easy to read terminal display. you will need to change the name to ls!!!! (also, sometimes my router takes a little walk in the park....)---
Change 'ls' directory colors
to get it working, one needs to install GNU fileutils (better versions of chgrp, chmod, chown, cp, dd, df, dir, dircolors, du, install, ln, ls, mkdir, mkfifo, mknod, mv, rm, rmdir, shred, sync, touch, and vdir) BUT version 4.1 has a bug in dircolors, so color for "DOOR" should be left undefined in LS_COLORS... found it out today, tried to recompile, but no go...
Change 'ls' directory colors
Whenever I have tried using colors - in particular colors in ls ... my terminal slows to a crawl. You wouldn't think simple colors would do that - but it does.
Change 'ls' directory colors
I noticed that too. But everything in Terminal is slow. Try
Change 'ls' directory colors
my terminal app seems to be very quick. never had any problems with it. i proved it to myself by executing
find /
Change 'ls' directory colors
for those wishing to change the colors from the default ones chosen by Panther, it is pretty simple...
Change 'ls' directory colors
leopard's man ls gives the following info: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.46 seconds |
|