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 |
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... |
As GNUisms will probably annoy you rather now than later, there's always colorls to save you:
https://github.com/athityakumar/colorls |
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.
|
It's been awhile since I worked on Sun systems, but I think the
Code:
-F, --classify |
Thanks for the help everyone. Yes, the -F option works, and adds a / and a * to directories and executable files respectively. That's the best that can be done. I don't care what anyone says though - colors are much much better! :)
|
All times are GMT -5. The time now is 04:35 PM. |