이것저것 찾아봤는데 의외로 간단한방법이 있었다.
dircolors 라고 명령을 때리면
각 ls 출력별 셋팅된 ansi color 가 표시된다.
.
각 항목별 의미하는 바는 아래와 같다.
| no |
NORMAL, NORM |
Global default, although everything should be something |
| fi |
FILE |
Normal file |
| di |
DIR |
Directory |
| ln |
SYMLINK, LINK, LNK |
Symbolic link. If you set this to ‘target’ instead of a numerical value, the color is as for the file pointed to. |
| pi |
FIFO, PIPE |
Named pipe |
| do |
DOOR |
Door |
| bd |
BLOCK, BLK |
Black device |
| cd |
CHAR, CHR |
Character device |
| or |
ORPHAN |
Symbolic link pointing to a non-existent file |
| so |
SOCK |
Socket |
| su |
SETUID |
File that is setuid (u+s) |
| sg |
SETGID |
File that is setgid (g+s) |
| tw |
STICKY_OTHER_WRITABLE |
Directory that is sticky and other-writable (+t,o+w) |
| ow |
OTHER_WRITABLE |
Directory that is other-writable (o+w) and not sticky |
| st |
STICKY |
Directory with the sticky bit set (+t) and not other-writable |
| ex |
EXEC |
Executable file (i.e. has ‘x’ set in permissions) |
| mi |
MISSING |
Non-existent file pointed to by a symbolic link (visible when you type ls -l) |
| lc |
LEFTCODE, LEFT |
Opening terminal code |
| rc |
RIGHTCODE, RIGHT |
Closing terminal code |
| ec |
ENDCODE, END |
Non-filename text |
| *.extension |
|
Every file using this extension e.g. *.jpg |
.
ansi 색깔지정은 아래 표대로 하면된다.
| Effects |
| 00 |
Default colour |
| 01 |
Bold |
| 04 |
Underlined |
| 05 |
Flashing text |
| 07 |
Reversetd |
| 08 |
Concealed |
| Colours |
| 31 |
Red |
| 32 |
Green |
| 33 |
Orange |
| 34 |
Blue |
| 35 |
Purple |
| 36 |
Cyan |
| 37 |
Grey |
| Backgrounds |
| 40 |
Black background |
| 41 |
Red background |
| 42 |
Green background |
| 43 |
Orange background |
| 44 |
Blue background |
| 45 |
Purple background |
| 46 |
Cyan background |
| 47 |
Grey background |
| Extra colours |
| 90 |
Dark grey |
| 91 |
Light red |
| 92 |
Light green |
| 93 |
Yellow |
| 94 |
Light blue |
| 95 |
Light purple |
| 96 |
Turquoise |
| 97 |
White |
| 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 |
.
putty 는 extra colors 가 잘먹는데, secure crt 같은 툴은 잘먹지않는다.
그래서 putty 에 버닝할때와 secure crt 에 버닝할때 설정을 조금씩 바꿔줘야 하는 번거로움이 잇따.
요즘에는 CRT 에 버닝하는중이라 밝은 파랑색이 putty 처럼 이쁘게 나오지 않아서 해결책을 알아보다가 발견한 내용이다.
.
실제적용은 아래와 같이 하면된다.
디렉토리 색을 변경하려면..
export LS_COLORS="di=01;35" <-- 이쁜 자주색..
Posted by jinushun