Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colored output of ls 2

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

When accessing the servers using putty, the output of the ls command appears in different colors on different servers.

Is there a way to display the output without these colors?

Regards,
Dan
 
Sounds like you are accessing linux servers and that "ls" has been aliased to "ls --color" in the system-wide profile. If you dont want to see the colors, either remove the alias from the system-wide profile or do this either interactively or in your personal profile:

unalias ls



Add a little color to your PUTTY terminal: faq52-6627
 
sbrews,

You are right – it's on the Linux servers. Many thanks!

Regards,
Dan
 
\ls will ignore the alias

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Well... I never knew that! Is it documented or just an obscure trick?

Doesn't seem to work with functions, only aliases...

Annihilannic.
 
aliases are usually set in your environment when you login.

I found this years ago when I was using xwindows with colored background and foreground where the ls with colors made stuff disappear because the default colors matched my foreground or background colors.

the \ backslash escapes the alias so you don't have to remove, change or unalias them.



A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

35 years Bell, AT&T, Lucent, Avaya
Tier 3 for 25 years and counting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top