ls 명령에서 LS_COLOR 환경변수로 확장자별 색 바꾸기
제 .bashrc 중 일부분입니다.
---------------------------------------------------------------------------------------------
...
# 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 01;34 # directory
# LINK 01;36 # symbolic link
# FIFO 40;33 # pipe
# SOCK 01;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
LS_COLORS="di=01;31:or=1;40;31:*.gz=1;35:*.bz2=1;35:*.tar=1;35:*.rpm=1;35:*.tgz=1;35:*.h=1;37:*.c=1;37:*.patch=1;37"
export LS_COLORS
...
---------------------------------------------------------------------------------------------
주석은 /etc/DIR_COLORS 에서 참고 했습니다.
제 설정을 설명하면,
규칙은 [특수파일|*.확장자]= [속성];[색]
이고, 구분자는 ":" 입니다.
di는 DIR의 단축 입니다.
or은 ORPHAN의 단축 이고요.
예 처럼주석에 나와있는 특수 파일에 대한 설정도 하실 수 있습니다.
위의 예를 .bashrc 에 넣으시고, 입맛에 맞게 색을 바꿔보세요.<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
---------------------------------------------------------------------------------------------
...
# 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 01;34 # directory
# LINK 01;36 # symbolic link
# FIFO 40;33 # pipe
# SOCK 01;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
LS_COLORS="di=01;31:or=1;40;31:*.gz=1;35:*.bz2=1;35:*.tar=1;35:*.rpm=1;35:*.tgz=1;35:*.h=1;37:*.c=1;37:*.patch=1;37"
export LS_COLORS
...
---------------------------------------------------------------------------------------------
주석은 /etc/DIR_COLORS 에서 참고 했습니다.
제 설정을 설명하면,
규칙은 [특수파일|*.확장자]= [속성];[색]
이고, 구분자는 ":" 입니다.
di는 DIR의 단축 입니다.
or은 ORPHAN의 단축 이고요.
예 처럼주석에 나와있는 특수 파일에 대한 설정도 하실 수 있습니다.
위의 예를 .bashrc 에 넣으시고, 입맛에 맞게 색을 바꿔보세요.<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 93 | ||
| 8229 | 9년 전 | 94 | ||
| 8228 |
커네드커네드
|
9년 전 | 139 | |
| 8227 | 9년 전 | 162 | ||
| 8226 | 9년 전 | 187 | ||
| 8225 | 9년 전 | 174 | ||
| 8224 | 9년 전 | 166 | ||
| 8223 | 9년 전 | 137 | ||
| 8222 |
|
9년 전 | 212 | |
| 8221 | 9년 전 | 121 | ||
| 8220 | 9년 전 | 138 | ||
| 8219 | 9년 전 | 119 | ||
| 8218 | 9년 전 | 165 | ||
| 8217 |
star3840
|
9년 전 | 135 | |
| 8216 | 9년 전 | 185 | ||
| 8215 | 9년 전 | 139 | ||
| 8214 | 9년 전 | 248 | ||
| 8213 | 9년 전 | 191 | ||
| 8212 | 9년 전 | 110 | ||
| 8211 | 9년 전 | 277 | ||
| 8210 | 9년 전 | 275 | ||
| 8209 | 9년 전 | 361 | ||
| 8208 | 9년 전 | 251 | ||
| 8207 | 9년 전 | 250 | ||
| 8206 |
|
9년 전 | 212 | |
| 8205 | 9년 전 | 198 | ||
| 8204 | 9년 전 | 157 | ||
| 8203 | 9년 전 | 253 | ||
| 8202 | 9년 전 | 167 | ||
| 8201 | 9년 전 | 201 | ||
| 8200 | 9년 전 | 193 | ||
| 8199 | 9년 전 | 237 | ||
| 8198 | 9년 전 | 202 | ||
| 8197 | 9년 전 | 186 | ||
| 8196 | 9년 전 | 578 | ||
| 8195 | 9년 전 | 185 | ||
| 8194 | 9년 전 | 310 | ||
| 8193 | 9년 전 | 187 | ||
| 8192 | 9년 전 | 223 | ||
| 8191 | 9년 전 | 171 | ||
| 8190 | 9년 전 | 164 | ||
| 8189 | 9년 전 | 227 | ||
| 8188 | 9년 전 | 158 | ||
| 8187 | 9년 전 | 170 | ||
| 8186 | 9년 전 | 166 | ||
| 8185 | 9년 전 | 341 | ||
| 8184 | 9년 전 | 129 | ||
| 8183 | 9년 전 | 342 | ||
| 8182 | 9년 전 | 198 | ||
| 8181 | 9년 전 | 160 | ||
| 8180 | 9년 전 | 729 | ||
| 8179 | 9년 전 | 510 | ||
| 8178 | 9년 전 | 340 | ||
| 8177 |
kiplayer
|
9년 전 | 352 | |
| 8176 | 9년 전 | 386 | ||
| 8175 | 9년 전 | 254 | ||
| 8174 | 9년 전 | 272 | ||
| 8173 | 9년 전 | 365 | ||
| 8172 | 9년 전 | 230 | ||
| 8171 | 9년 전 | 204 | ||
| 8170 | 9년 전 | 319 | ||
| 8169 |
커네드커네드
|
9년 전 | 283 | |
| 8168 | 9년 전 | 351 | ||
| 8167 | 9년 전 | 343 | ||
| 8166 | 9년 전 | 264 | ||
| 8165 | 9년 전 | 193 | ||
| 8164 | 9년 전 | 328 | ||
| 8163 | 9년 전 | 310 | ||
| 8162 | 9년 전 | 331 | ||
| 8161 | 9년 전 | 320 | ||
| 8160 |
|
9년 전 | 521 | |
| 8159 | 9년 전 | 457 | ||
| 8158 | 9년 전 | 276 | ||
| 8157 | 9년 전 | 402 | ||
| 8156 | 9년 전 | 289 | ||
| 8155 | 9년 전 | 279 | ||
| 8154 |
00년생용띠
|
9년 전 | 625 | |
| 8153 | 9년 전 | 259 | ||
| 8152 |
|
9년 전 | 435 | |
| 8151 | 9년 전 | 443 | ||
| 8150 | 9년 전 | 533 | ||
| 8149 |
Jangfolk
|
9년 전 | 374 | |
| 8148 | 9년 전 | 199 | ||
| 8147 | 9년 전 | 408 | ||
| 8146 | 9년 전 | 473 | ||
| 8145 | 9년 전 | 428 | ||
| 8144 | 9년 전 | 388 | ||
| 8143 | 9년 전 | 222 | ||
| 8142 | 9년 전 | 460 | ||
| 8141 | 9년 전 | 407 | ||
| 8140 | 9년 전 | 954 | ||
| 8139 | 9년 전 | 294 | ||
| 8138 |
전갈자리남자
|
9년 전 | 414 | |
| 8137 | 9년 전 | 428 | ||
| 8136 | 9년 전 | 773 | ||
| 8135 |
|
9년 전 | 818 | |
| 8134 |
PlayPixel
|
9년 전 | 545 | |
| 8133 |
|
9년 전 | 467 | |
| 8132 | 9년 전 | 487 | ||
| 8131 | 9년 전 | 837 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기