 |
 |
terminal output in color?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Status:
Offline
|
|
i'm trying to get ls to output in color.
on a Linux box, i can type 'ls --color=tty'. however this doesn't seem to have any effect in the OSX (10.3) terminal.
thanks for any ideas,
ox
(Last edited by OmniX; Jan 16, 2005 at 05:35 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status:
Offline
|
|
How about :
I found that the man page for ls has a bunch of things about color output in it.
Dominik Hoffmann
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by DominikHoffmann:
How about:
I found that the man page for ls has a bunch of things about color output in it.
Dominik Hoffmann
i've tried that, and unfortunately it doesn't seem to work!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status:
Offline
|
|
I've got this, when I do ls -laG:
Do you have something different?
Dominik Hoffmann
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jun 2000
Status:
Offline
|
|
What version of 10.3 are you running? ls -G works for me running 10.3.7. Remember that UNIX is case sensitive (unlike DOS). Make sure you're using a capital G in the command or it won't work. In fact, using a lowercase g is an entirely different switch!
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by bradoesch:
What version of 10.3 are you running? ls -G works for me running 10.3.7. Remember that UNIX is case sensitive (unlike DOS). Make sure you're using a capital G in the command or it won't work. In fact, using a lowercase g is an entirely different switch!
running 10.3.7. and i do invoke the proper switch: ls -G.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 2001
Location: Leesburg, Virginia
Status:
Offline
|
|
Have you tried reinstalling your OS? 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by OmniX:
i'm trying to get ls to output in color.
on a Linux box, i can type 'ls --color=tty'. however this doesn't seem to have any effect in the OSX (10.3) terminal.
You can do this on your Mac OS X box too, I've been doing it for several cat incarnations now (haha). You'll need to install the GNU ls, which is a part of the GNU coreutils package if you want pretty colors. I've always thought that ls -G had ugly colors, and besides, I'm used to the GNU ls's color scheme by now anyways.

|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2004
Status:
Offline
|
|
first make sure your $TERM is set to something like xterm-color. then make sure $CLICOLOR is set to 1. you dont have to install the GNU coreutils, although you certainly can if you want to. if you want to use the -G switch you dont need to set $CLICOLOR.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Status:
Offline
|
|
Originally posted by leira:
first make sure your $TERM is set to something like xterm-color. then make sure $CLICOLOR is set to 1. you dont have to install the GNU coreutils, although you certainly can if you want to. if you want to use the -G switch you dont need to set $CLICOLOR.
thanks. can you be a bit more explicit in your instructions?
also, is there a reason why Apple doesn't configure the terminal like this by default?
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2004
Status:
Offline
|
|
the way to set those variables is different for each shell.
first bash:
Code:
export TERM="xterm-color"
export CLICOLOR=1
now tcsh:
Code:
set term="xterm-color"
set clicolor=1
first just type those two commands into the terminal then try your ls.
if it works add those lines to a file called .profile in your home directory. easy way to do it is:
Code:
echo 'export TERM="xterm-color"' >> ~/.profile
i'm working from staight memory here so if that tcsh stuff is off a little please forgive me. if you using a different shell than the 2 above it shouldnt be hard to find out how to set the proper variables.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Dec 2004
Status:
Offline
|
|
Originally posted by leira:
the way to set those variables is different for each shell.
...
[snip]
...
Or, you can set the Terminal type in "Terminal -> Preferences...".
Steve
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|