Color output from ls – based on file type
Threre are certain default variables which control the color of the output from the ls command, so we will talk about them today.
The first one is to get the color output from the ”ls” command. We will look at the various ways to do this:
First is to use this with default colors:
ls –color=auto
Now this will use the default colors which might not go with your liking 🙂 So if you want to change the colors you can use the variable called LS_COLORS.
export LS_COLORS=’di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rb=90’
There is another variable called CLICOLOR which is described well <a href="http://lantech.geekvenue.net/chucktips/jason/chuck/1092014257/index_html" target="_blank">here.
Related Articles:
- 2010/02/04 Crossfire game server.. free connection.
- 2010/02/03 Gentoo, Knoppix and Linux Console Screenshots
- 2010/02/03 Installing Sofware on Linux, easier and finding alternates.
- 2010/02/03 Last access time for file
- 2010/02/03 Built-in lists in vim

Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.