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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8130 | 9년 전 | 504 | ||
| 8129 |
|
9년 전 | 651 | |
| 8128 | 9년 전 | 517 | ||
| 8127 |
|
9년 전 | 574 | |
| 8126 | 9년 전 | 504 | ||
| 8125 | 9년 전 | 764 | ||
| 8124 |
|
9년 전 | 512 | |
| 8123 | 9년 전 | 499 | ||
| 8122 | 9년 전 | 431 | ||
| 8121 | 9년 전 | 535 | ||
| 8120 | 9년 전 | 460 | ||
| 8119 | 9년 전 | 544 | ||
| 8118 |
|
9년 전 | 628 | |
| 8117 |
|
9년 전 | 397 | |
| 8116 |
PASKRAN
|
9년 전 | 466 | |
| 8115 | 9년 전 | 456 | ||
| 8114 |
kiplayer
|
9년 전 | 596 | |
| 8113 | 9년 전 | 439 | ||
| 8112 |
|
9년 전 | 555 | |
| 8111 | 9년 전 | 406 | ||
| 8110 | 9년 전 | 441 | ||
| 8109 | 9년 전 | 360 | ||
| 8108 |
|
9년 전 | 538 | |
| 8107 |
|
9년 전 | 436 | |
| 8106 |
|
9년 전 | 431 | |
| 8105 | 9년 전 | 474 | ||
| 8104 |
|
9년 전 | 427 | |
| 8103 |
|
9년 전 | 427 | |
| 8102 |
|
9년 전 | 389 | |
| 8101 |
snshero
|
9년 전 | 779 | |
| 8100 | 9년 전 | 835 | ||
| 8099 | 9년 전 | 807 | ||
| 8098 | 9년 전 | 711 | ||
| 8097 | 9년 전 | 513 | ||
| 8096 | 9년 전 | 710 | ||
| 8095 | 9년 전 | 839 | ||
| 8094 | 9년 전 | 509 | ||
| 8093 | 9년 전 | 793 | ||
| 8092 | 9년 전 | 754 | ||
| 8091 | 9년 전 | 1139 | ||
| 8090 | 9년 전 | 763 | ||
| 8089 | 9년 전 | 969 | ||
| 8088 | 9년 전 | 637 | ||
| 8087 | 9년 전 | 754 | ||
| 8086 | 9년 전 | 516 | ||
| 8085 | 9년 전 | 485 | ||
| 8084 | 9년 전 | 607 | ||
| 8083 | 9년 전 | 581 | ||
| 8082 | 9년 전 | 751 | ||
| 8081 | 9년 전 | 468 | ||
| 8080 | 9년 전 | 565 | ||
| 8079 | 9년 전 | 514 | ||
| 8078 | 9년 전 | 446 | ||
| 8077 | 9년 전 | 526 | ||
| 8076 | 9년 전 | 406 | ||
| 8075 | 9년 전 | 433 | ||
| 8074 | 9년 전 | 394 | ||
| 8073 | 9년 전 | 444 | ||
| 8072 | 9년 전 | 440 | ||
| 8071 |
o1o111
|
9년 전 | 891 | |
| 8070 | 9년 전 | 398 | ||
| 8069 | 9년 전 | 334 | ||
| 8068 | 9년 전 | 582 | ||
| 8067 | 9년 전 | 388 | ||
| 8066 | 9년 전 | 423 | ||
| 8065 | 9년 전 | 378 | ||
| 8064 | 9년 전 | 361 | ||
| 8063 | 9년 전 | 333 | ||
| 8062 | 9년 전 | 305 | ||
| 8061 | 9년 전 | 349 | ||
| 8060 | 9년 전 | 385 | ||
| 8059 | 9년 전 | 317 | ||
| 8058 | 9년 전 | 254 | ||
| 8057 | 9년 전 | 382 | ||
| 8056 | 9년 전 | 304 | ||
| 8055 | 9년 전 | 339 | ||
| 8054 | 9년 전 | 360 | ||
| 8053 | 9년 전 | 412 | ||
| 8052 | 9년 전 | 291 | ||
| 8051 | 9년 전 | 326 | ||
| 8050 | 9년 전 | 387 | ||
| 8049 | 9년 전 | 318 | ||
| 8048 | 9년 전 | 432 | ||
| 8047 | 9년 전 | 352 | ||
| 8046 | 9년 전 | 298 | ||
| 8045 | 9년 전 | 254 | ||
| 8044 | 9년 전 | 344 | ||
| 8043 | 9년 전 | 287 | ||
| 8042 | 9년 전 | 290 | ||
| 8041 | 9년 전 | 343 | ||
| 8040 | 9년 전 | 269 | ||
| 8039 | 9년 전 | 317 | ||
| 8038 | 9년 전 | 267 | ||
| 8037 | 9년 전 | 399 | ||
| 8036 | 9년 전 | 481 | ||
| 8035 | 9년 전 | 424 | ||
| 8034 | 9년 전 | 384 | ||
| 8033 | 9년 전 | 347 | ||
| 8032 | 9년 전 | 429 | ||
| 8031 | 9년 전 | 344 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기