AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  How To Get Color Output for ls Via Bash

    Posted Wed August 29, 2007 11:42 AM

    Originally posted by: estuart


    We using bash on our AIX 5L servers and would like to get the color output for the ls command. The /etc/bashrc file does not have references to color. How do we get the color enables for ls in bash on AIX?
    #AIX-Forum


  • 2.  Re: How To Get Color Output for ls Via Bash

    Posted Wed August 29, 2007 03:55 PM

    Originally posted by: SystemAdmin


    > We are using bash on our AIX 5L servers and would like to
    > get [] color output for the ls command. The
    > /etc/bashrc file does not have any references to color.
    > How do we get the color enabled for ls in bash on
    > [] AIX?

    A few concepts should help.

    bash is a shell.
    A shell is an executable that interprets commands from a
    file (such as an interactive console) and accordingly
    passes executable files, parameters, and environment
    to system calls for execution.
    As such bash understands nothing about the color, font, ...
    of any other executable.
    (Shells merely record and convey information which
    often includes the configuration data for other executables.)

    ls(1) support color terminal output,
    with the --color option.
    See ls(1) for details.
    #AIX-Forum


  • 3.  Re: How To Get Color Output for ls Via Bash

    Posted Thu September 20, 2007 10:04 PM

    Originally posted by: dukessd


    Check this out:
    http://www.tek-tips.com/faqs.cfm?fid=6627

    I don't think AIX native terminals can do it but if you use a terminal emulator like Putty you stand a chance.

    I've never tried it because I don't have a problem spotting directories, etc. due to the d, etc. at the beginning of the line, which I think is always a dead give away, but please let us know how you get on.
    #AIX-Forum