home
home profile hosting info news fun stuff Technical Stuff support contact us
LINUX CONFIGURATION TIPS

Categories

Setting dircolors

In order to get colored output from the ls command, add the following to your .bashrc and .bash_profile file:

export LS_OPTIONS='-F --color'
eval `dircolors -b ~/.colors`
alias ls='ls $LS_OPTIONS'
The reason for including the code in both is that ~/.bashrc is read by a non login shell (an xterm invoked without the -ls switch) and ~/.bash_profile is read by a login shell. So by modifying both files, you will get a colored output always.

You can generate the .colordb file by simply using this command:

dircolors -p > .colors

Once generated, you can then modify them to suit your needs (a simple call to dircolors --help would give you all the information you need for modifying them).

Go back to the System Configuration Tips page.
Go back to the Technical page.
Go back to the main page.

Home | Profile | Hosting | Info | News | Fun Stuff | Tech | Support | Contact Us | J2ME tips and news

© Copyright liviutudor.com.
Based on a template from TemplatesBox.com

Valid CSS! Valid XHTML 1.0 Transitional Get FireFox! Powered by Debian Linux Powered by Apache Web Server No Software Patents View My profile on LinkedIn

Interesting site about getting Londoners chatting during their daily commute I Can Talk, Me!
Liviu Tudor personal web page details hobbies also loads of technical tips and fun stuff for you to browse code to download free and applications Java J2ME mobile code free mobile Java J2ME applications to download and use on your mobile phone read technical Java J2ME articles details for Liviu Tudor Lipu Liv have a look at the technical tips provided for various technical categories fun stuff funny quotes ASCII art drawing ascii bitmaps fun knowledge base technical tips programming sysadmin windows Java java knowledge base