ls and color

ls and color

Post by Brian Pribi » Wed, 07 Jul 1999 04:00:00



O.K.  This sounds like it should be easy, but I can't figure it out.  I
want my ls to print dir info in color.  You know, with execs one color,
sym links another etc.  Well, I have a DIR_COLORS file in my etc dir.  I
tried putting it as .dir_colors for yucks.  I restarted my session, and
nothing.  I know the files are set correctly (according to the man
page), and still nothing.  What can I do?  It must be my color
environment is being over ridden somewhere but where?  I am using RedHat
linux.  If anyone has any ideas I am all ears.  Thank you.

Brian.

--
The Trainer's Directory: Quality Resources for Organizational Training
and

  pribis.vcf
< 1K Download
 
 
 

ls and color

Post by Al Koo » Wed, 07 Jul 1999 04:00:00



>O.K.  This sounds like it should be easy, but I can't figure it out.  I
>want my ls to print dir info in color.  You know, with execs one color,
>sym links another etc.  Well, I have a DIR_COLORS file in my etc dir.  I
>tried putting it as .dir_colors for yucks.  I restarted my session, and
>nothing.  I know the files are set correctly (according to the man
>page), and still nothing.  What can I do?  It must be my color
>environment is being over ridden somewhere but where?  I am using RedHat
>linux.  If anyone has any ideas I am all ears.  Thank you.

>Brian.

>--
>The Trainer's Directory: Quality Resources for Organizational Training
>and



Hey Brian

I put an alias in my .bashrc in the root dir that says : alias ll =
'ls -ask --colour'
I'm not sure about the "alias ll = " I don't know it by heart, but you'll
see it when you look at the file.
Just enter emacs .bashrc in the console right after you login. then you'll
see a couple of aliases already entered in the file just insert yours after
the last alias. That should work !

Al

 
 
 

ls and color

Post by John Stran » Wed, 07 Jul 1999 04:00:00


This is what I have in my /etc/bashrc  file

alias ls="ls --color=tty"

: This is a multi-part message in MIME format.
: --------------82217DFFB3599BE8ABF44FD3
: Content-Type: text/plain; charset=us-ascii
: Content-Transfer-Encoding: 7bit

: O.K.  This sounds like it should be easy, but I can't figure it out.  I
: want my ls to print dir info in color.  You know, with execs one color,
: sym links another etc.  Well, I have a DIR_COLORS file in my etc dir.  I
: tried putting it as .dir_colors for yucks.  I restarted my session, and
: nothing.  I know the files are set correctly (according to the man
: page), and still nothing.  What can I do?  It must be my color
: environment is being over ridden somewhere but where?  I am using RedHat
: linux.  If anyone has any ideas I am all ears.  Thank you.

: Brian.

< snipped stuff so I could post>

--
While Alcatel may claim ownership of all my ideas (on or off the job),
Alcatel does not claim any responsibility for them. Warranty expired when u
opened this article and I will not be responsible for its contents or use.

 
 
 

ls and color

Post by Matthew W. Rober » Wed, 07 Jul 1999 04:00:00


If you are using tcsh put the following in .tcshrc:

alias ls    ls-F
set   color=ls-F

optionally you can define colors yourself:

setenv LS_COLORS 'di=1'    # directories

see the tcsh man for details

 
 
 

ls and color

Post by Yan Seine » Wed, 07 Jul 1999 04:00:00


make sure your terminal type supports color.  Seems the standard ANSI
terminal does not.  Use xterm-color.

Yan


> O.K.  This sounds like it should be easy, but I can't figure it out.  I
> want my ls to print dir info in color.  You know, with execs one color,
> sym links another etc.  Well, I have a DIR_COLORS file in my etc dir.  I
> tried putting it as .dir_colors for yucks.  I restarted my session, and
> nothing.  I know the files are set correctly (according to the man
> page), and still nothing.  What can I do?  It must be my color
> environment is being over ridden somewhere but where?  I am using RedHat
> linux.  If anyone has any ideas I am all ears.  Thank you.

> Brian.

> --
> The Trainer's Directory: Quality Resources for Organizational Training
> and



--

           __      __
          | /      /
           /------/
       -- / \    / \ --
     /   /\  \  /  /\   \
    |   /  |  \/--|--    |
     \    /        \    /
       ~~            ~~

"The older I get, the faster I was."