colorls for SunOS & Solaris

port by Randall Hopper (aa8vb@nc.rr.com)

What is it?

NOTE: This is a really ooold page. If you want a supported colorized ls, consider using the 'ls' that comes with GNU fileutils, available from: ftp://prep.ai.mit.edu:/gnu/fileutils.

colorls is a colorized version of the standard UNIX "ls" command that works well with color xterms and VT100 terminals. It allows users to selectively display different types of files with different permissions in user-defined colors (e.g. regular files gray, directories cyan, symbolic links purple, etc.). This program was ported to Solaris and SunOS from the original version written for the FreeBSD 2.1 (4.4BSD Lite) distribution.

Colorized directory listings tend to grow on you. Having wanted one for Solaris and SunOS for some time, and having not been able to find an already-ported version, I ported FreeBSD's.

What's new?

Updated 4/29/96 for SunOS 4.x machines without strerror().

How do I get it?

How do I build it?

Doesn't take much. Just change the compiler: cc for SunOS, your favorite ANSI compiler for Solaris (I used Centerline's clcc).

How do I run it?

Install the binary in your bin directory (call it colorls), and flip this in your .cshrc (I assume you're running tcsh :-) :
    setenv LSCOLORS 6x5x2x3x2x464301060203
    alias ls colorls -GCFk
    stty tab0
The last line is needed to ensure that the tabs are passed onto your terminal emulator (e.g. color_xterm). Sun terminal devices seem to have trouble expanding tabs with embedded ESCape sequences in the stream.

Hope you find this port useful.


Randall Hopper
aa8vb@nc.rr.com
Last Update: 09/04/01