LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-01-2018, 12:23 PM   #1
tfg99
LQ Newbie
 
Registered: Sep 2018
Posts: 17

Rep: Reputation: Disabled
No coloring for directories and files on SunOS


Hi all,

I have to ssh into a server at work (SunOS 5.10 Generic_147148-26 i86pc i386 i86pc), but when I do everything is colored the same way, so it's hard to see what's a file, directory, linked file etc. I'm used to using Ubuntu and Red Hat, which show colors automatically.

I've tried altering the bashrc file to make things colored with the code below, but it doesn't help. I'm guessing LS_COLORS isn't a SunOS thing?

LS_COLORS="$LS_COLORS:di=00;94:fi=00;33:ex=01;33:ln=01;36"
export LS_COLORS

I added the following code to change the color and style of my terminal prompt though, and that works:

export PS1="\[\033[00;95m\]\W \$ \[\033[0m\]"

If anyone can offer any help, that would be great!

Jack
 
Old 10-01-2018, 03:52 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint, Tribblix
Posts: 9,754

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
LS_COLORS is a GNUism. You need to us GNU ls to get this functionality.

It might be installed or not under Solaris 10, have a look to /usr/sfw/bin/ls, /opt/csw/bin/ls, /usr/local/bin/ls and other potential freeware directories. Under Solaris 11, GNU ls is in /usr/gnu/bin.

Funnily enough, when I connect to a Linux system, one of the first things I do is to unset the ls alias to remove the annoying colors, especially the directories displayed in dark blue on black...
 
Old 10-11-2018, 05:34 AM   #3
YesItsMe
Member
 
Registered: Oct 2014
Distribution: Gentoo
Posts: 421

Rep: Reputation: 133Reputation: 133
As GNUisms will probably annoy you rather now than later, there's always colorls to save you:
https://github.com/athityakumar/colorls
 
Old 10-11-2018, 06:17 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,092

Rep: Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613Reputation: 2613
I'm with @jlliagre - mindless colouring is mindless. More so if you use a white terminal. Not that I ever had a positive thing to say about SunOS when I had to use it.
 
Old 10-11-2018, 01:11 PM   #5
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 1,776

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
It's been awhile since I worked on Sun systems, but I think the
Code:
-F, --classify
option applies there. Much more useful, IMO, than colors.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sub-Directories not picking up correct group permissions for new files/directories JockVSJock Linux - Newbie 4 05-07-2017 10:52 AM
[SOLVED] Turn off coloring files in Midnight Commander Mr. Alex Linux - Software 2 01-22-2012 06:49 AM
How to store files/directories in different different directories!! anishkumarv Linux - Newbie 7 03-23-2011 05:26 PM
bash ls not coloring files, directories etc mr_smith Red Hat 2 08-30-2006 07:05 AM
using SunOS plot files (1b or 4b format) in linux jkey Solaris / OpenSolaris 0 09-18-2005 06:14 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration