2
I'm on a Mac under OSX. I ssh into a remote server which is running SunOS. The default shell under the remote server is tcsh
, not bash
. How can I set the ls
to generate color coded output as I have under the bash shell in OSX.
I can get a color coded custom prompt by editing the .cshrc
file to include something like:
set prompt="%{\033[1;31m%}%n%{\033[1;34m%@%m %{\033[0;37m%}%~ %{\033[1;36m%}%%%{\033[0m%} "
However, I can't seem to figure out how to edit the directory listing colors. It it even possible to do so?
I should state up front that I do not have admin access to this server, so I can't blanket install the gnu alternatives (or at least, I would have to set them up locally, which I don't yet know how to do.)
Not sure for SunOS. On CentOS in tcsh the colors are provided by the environment variable LS_COLORS, better said ls is using the variable. Can you check this on SunOS? – Zina – 2016-03-01T20:32:38.660
Usually the
ls-F
builtin (no space!) should do this, but I haven't used Solaris in years so I can't test/be sure. You can try looking for a flag inman ls
(maybe--color
or-G
?) Many default bashrc files aliasls
to something with colours... – Martin Tournoij – 2016-03-01T20:33:25.143LS_COLORS is undefined. I tried defining it, but no dice. However, I'm not very good at this, so I may be doing something wrong.
--color isn't a valid flag under this install. – WildGunman – 2016-03-01T21:36:41.947
What version of Solaris?
ls
may have a-colors
option. Do you have a/usr/gnu/bin
directory? Does the install have GNU utilities in the default path -ggrep
,gtar
, etc.? One thing to be aware of - GNU utilities can't handle Solaris-specific features such as a file's extended attributes. – Andrew Henle – 2016-03-02T15:28:36.057It's Solaris 5.10. There's no gnu directory in
/usr/
, though the gnu utilitiesggrep
,gtar
exist and are located under/usr/swf/bin
. Gnu emacs is in/usr/local/bin
(by default, I didn't install it there.) Can I grab a Solarisgnu ls
binary and dump it there? – WildGunman – 2016-03-03T01:10:00.523Sorry, it's SunOS 5.10, which I guess means its Solaris 10. – WildGunman – 2016-03-03T01:21:53.043
@WildGunman Is there a
gls
in/usr/sfw/bin
? That would be GNUls
. – Andrew Henle – 2016-03-03T12:21:05.603@andrew-henle No, there's not. Sorry, I should have specified, I looked for
gls
. – WildGunman – 2016-03-03T16:15:37.147