Posts Tagged pretty

Pretty Linux?


So what do you think? Is it pretty? LOL 🙂

I guess I should have added how to actually do this… Here is the quick-n-dirty way:

Add the following to the bottom of your .bashrc file for whatever user:

#
alias ls=’ls –color’
LS_COLORS=’di=1;96:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=94:*.tar=92:*.sh=32:*.log=91:*.gz=93:*.tgz=93′
export LS_COLOR

Here is a quick legend for the color associations:

di = directory
fi = file
ln = symbolic link
pi = fifo file
so = socket file
bd = block (buffered) special file
cd = character (unbuffered) special file
or = symbolic link pointing to a non-existent file (orphan)
mi = non-existent file pointed to by a symbolic link (visible when you type ls -l)
ex = file which is executable (ie. has ‘x’ set in permissions)

0   = default colour
1   = bold
4   = underlined
5   = flashing text
7   = reverse field
31  = red
32  = green
33  = orange
34  = blue
35  = purple
36  = cyan
37  = grey
40  = black background
41  = red background
42  = green background
43  = orange background
44  = blue background
45  = purple background
46  = cyan background
47  = grey background
90  = dark grey
91  = light red
92  = light green
93  = yellow
94  = light blue
95  = light purple
96  = turquoise
100 = dark grey background
101 = light red background
102 = light green background
103 = yellow background
104 = light blue background
105 = light purple background
106 = turquoise background

Also, you can combine more than one option per directive like this… *.log=91;1;42 which would give you this:

Advertisements

, , , ,

Leave a comment