Re: bash ls in color
On Mon, 31 Jul 2000, Ethan Benson wrote:
> On Mon, Jul 31, 2000 at 09:02:08PM -0700, Dale Morris wrote:
> > what do I enter to get bash to default to showing files in color. I
> > know I have to edit the /etc/bash.bashrc file, but don't remember the
> > command to enter.
>
> you should instead edit your own userid's ~/.bashrc and add the
> following:
>
> export LS_OPTIONS='--color=auto'
> eval `dircolors`
> alias ls='ls $LS_OPTIONS'
To actually define colors dircolors --help
Create the file dircolors -p > ls_colors.file
choose colors for type and suffixes by editing ls_colors.file
use:
eval `dircolors ls_colors.file`
>
> you can add that to /etc/profile or /etc/bash.bashrc if you really
> want it to be a global setting, but keep in mind not all people like
> colorized ls, so i would leave it as a user option (put it in
> /etc/skel/.bashrc as an example for new users if you like)
>
> --
> Ethan Benson
> http://www.alaska.net/~erbenson/
>
Reply to: