Colors when viewing folders in Terminal
Saw directory listing coloring at Golden Ruby Users Group this week, and needed to have it!
LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90' export LS_COLORS
Customize Your Colors
The values in LSCOLORS are codes corresponding to different colors for different types of files. The letter you use indicates which color to use, and the position in the string indicates what type of file should be that color. Each color comes in pairs – a foreground color and a background color. Here is a list of color values:
-
a = black
-
b = red
-
c = green
-
d = brown
-
e = blue
-
f = magenta
-
g = cyan
-
h = grey
-
A = dark grey
-
B = bold red
-
C = bold green
-
D = yellow
-
E = bold blue
-
F = magenta
-
G = cyan
-
H = white
-
x = default
And here is a list of the positions in LSCOLORS:
-
directory
-
symbolic link
-
socket
-
pipe
-
executable
-
block device
-
character device
-
executable with setuid set
-
executable with setguid set
-
directory writable by others, with sticky bit
-
directory writable by others, without sticky bit
export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced