RedHat and colors

RedHat and colors

Post by Marco Giardin » Fri, 15 Nov 1996 04:00:00



I've the RH4 and i set the alias ls=ls -colors to see colors when
displaying the directory contents.
The problem is that i need to print sometimes the dir structure and i
need to avoid the use of colors (ls -la > filename | lpr -Plp filename).
In this case i would like that the command ls -la DOESN'T DISPLAY any
color. Is it possible and how?
Thanks a lot for your reply to my e.mail.
Marco

 
 
 

RedHat and colors

Post by James Youngm » Fri, 15 Nov 1996 04:00:00



Quote:

>I've the RH4 and i set the alias ls=ls -colors to see colors when
>displaying the directory contents.
>The problem is that i need to print sometimes the dir structure and i
>need to avoid the use of colors (ls -la > filename | lpr -Plp filename).
>In this case i would like that the command ls -la DOESN'T DISPLAY any
>color. Is it possible and how?
>Thanks a lot for your reply to my e.mail.
>Marco

Use --color=auto.

--
James Youngman       VG Gas Analysis Systems |The trouble with the rat-race
 Before sending advertising material, read   |is, even if you win, you're
http://www.law.cornell.edu/uscode/47/227.html|still a rat.

 
 
 

RedHat and colors

Post by Erik Tro » Fri, 15 Nov 1996 04:00:00



>I've the RH4 and i set the alias ls=ls -colors to see colors when
>displaying the directory contents.
>The problem is that i need to print sometimes the dir structure and i
>need to avoid the use of colors (ls -la > filename | lpr -Plp filename).
>In this case i would like that the command ls -la DOESN'T DISPLAY any
>color. Is it possible and how?

Use "alias ls=ls --color=auto" instead. That will make ls handle pipe'd
output correctly.

Erik

-------------------------------------------------------------------------------
|       I told you I'm not very bright -- Sugar in "Some Like It Hot"         |
|                                                                             |

 
 
 

RedHat and colors

Post by Roger J. Alle » Sat, 16 Nov 1996 04:00:00



Quote:> I've the RH4 and i set the alias ls=ls -colors to see colors when
> displaying the directory contents.
> The problem is that i need to print sometimes the dir structure and i
> need to avoid the use of colors (ls -la > filename | lpr -Plp filename).

use /bin/ls, and the alias for ls will not be used.

--
Roger J. Allen                Rush-Presbyterian-St. Luke's Medical Center
System Administrator                                   Chicago,  IL   USA
Surgical Information Systems                       Voice:  (312)-942-4825

 
 
 

RedHat and colors

Post by Dave Whitinge » Sat, 16 Nov 1996 04:00:00



> > I've the RH4 and i set the alias ls=ls -colors to see colors when
> > displaying the directory contents.
> > The problem is that i need to print sometimes the dir structure and i
> > need to avoid the use of colors (ls -la > filename | lpr -Plp

filename).


Quote:> use /bin/ls, and the alias for ls will not be used.

Seems the best way is to edit /etc/DIR_COLORS - change "COLOR tty"
to "COLOR all".

Dave Whitinger

 
 
 

RedHat and colors

Post by jbuch.. » Sun, 17 Nov 1996 04:00:00



Quote:> use /bin/ls, and the alias for ls will not be used.

You can also quote the command name:

jbuchana$ "ls"
Makefile   Makefile~  litemp     litemp.c   litemp.c~  litemp.o
jbuchana$

This prevents i from being aliased.


=================== http://www.holli.com/~jbuchana =======================
"You can't get away, You can't really hide
 Once you hear the call, The song of the hall of heads"
 -They Might Be Giants
==========================================================================