make의 color 지정 방법과 유사하나 다르다.
terminal의 color속성은 /etc/DIR_COLORS 에 의해 결정이 된다.
user가 따로 적절하게 사용하고 싶다면, 이것을 ~/ 로 복사해서 사용하면 된다.
cp /etc/DIR_COLORS ~/.dir_colors
복사를 한 후 안의 내용을 살펴보면 여러가지 내용이 있는데
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Below are the color init strings for the basic file types. A color init # string consists of one or more of the following numeric codes: # Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed # Text color codes: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white NORMAL 00 # global default, although everything should be something. FILE 00 # normal file DIR 00;34 # directory LINK 00;36 # symbolic link FIFO 40;33 # pipe SOCK 00;35 # socket BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 01;05;37;41 # orphaned syminks MISSING 01;05;37;41 # ... and the files they point to |
위 부분의 FILE / DIR / LINK 등 각각의 항목 별로 색상을 지정할 수 있다. (색상은 그 위 쪽 주석 부분을 참고)