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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7530 | 10년 전 | 780 | ||
| 7529 |
파랑새1597
|
10년 전 | 1198 | |
| 7528 |
파랑새1597
|
10년 전 | 1303 | |
| 7527 |
integrity7
|
10년 전 | 1380 | |
| 7526 | 10년 전 | 2402 | ||
| 7525 |
다빈치코드777
|
10년 전 | 1094 | |
| 7524 | 10년 전 | 1558 | ||
| 7523 | 10년 전 | 953 | ||
| 7522 |
|
10년 전 | 985 | |
| 7521 |
blackkil
|
10년 전 | 1859 | |
| 7520 | 10년 전 | 1279 | ||
| 7519 |
Gaumi
|
10년 전 | 1073 | |
| 7518 | 10년 전 | 1474 | ||
| 7517 | 10년 전 | 816 | ||
| 7516 | 10년 전 | 1279 | ||
| 7515 | 10년 전 | 1392 | ||
| 7514 |
|
10년 전 | 4483 | |
| 7513 |
멋진남자임
|
10년 전 | 1133 | |
| 7512 |
다빈치코드777
|
10년 전 | 864 | |
| 7511 |
|
10년 전 | 3385 | |
| 7510 | 10년 전 | 1359 | ||
| 7509 | 10년 전 | 1134 | ||
| 7508 | 10년 전 | 711 | ||
| 7507 |
senseme
|
10년 전 | 734 | |
| 7506 |
멋진남자임
|
10년 전 | 1626 | |
| 7505 | 10년 전 | 3987 | ||
| 7504 | 10년 전 | 2139 | ||
| 7503 | 10년 전 | 988 | ||
| 7502 | 10년 전 | 514 | ||
| 7501 | 10년 전 | 1435 | ||
| 7500 | 10년 전 | 1483 | ||
| 7499 | 10년 전 | 3372 | ||
| 7498 | 10년 전 | 1195 | ||
| 7497 |
dethos79
|
10년 전 | 2956 | |
| 7496 | 10년 전 | 2138 | ||
| 7495 | 10년 전 | 849 | ||
| 7494 |
CHAVO
|
10년 전 | 1121 | |
| 7493 | 10년 전 | 2642 | ||
| 7492 | 10년 전 | 1253 | ||
| 7491 | 10년 전 | 1459 | ||
| 7490 | 10년 전 | 2325 | ||
| 7489 | 10년 전 | 2117 | ||
| 7488 |
toptopon
|
10년 전 | 887 | |
| 7487 |
|
10년 전 | 1025 | |
| 7486 | 10년 전 | 3343 | ||
| 7485 | 10년 전 | 1306 | ||
| 7484 | 10년 전 | 1364 | ||
| 7483 | 10년 전 | 1018 | ||
| 7482 | 10년 전 | 646 | ||
| 7481 | 10년 전 | 854 | ||
| 7480 | 10년 전 | 1218 | ||
| 7479 | 10년 전 | 2596 | ||
| 7478 | 10년 전 | 1154 | ||
| 7477 |
멋진남자임
|
10년 전 | 1505 | |
| 7476 |
zeppeto
|
10년 전 | 1138 | |
| 7475 |
200점아빠
|
10년 전 | 908 | |
| 7474 | 10년 전 | 4000 | ||
| 7473 | 10년 전 | 984 | ||
| 7472 |
나르시스1
|
10년 전 | 1233 | |
| 7471 | 10년 전 | 869 | ||
| 7470 | 10년 전 | 1268 | ||
| 7469 |
플라이SINJI
|
10년 전 | 959 | |
| 7468 |
|
10년 전 | 538 | |
| 7467 |
|
10년 전 | 646 | |
| 7466 | 10년 전 | 1108 | ||
| 7465 | 10년 전 | 1176 | ||
| 7464 |
|
10년 전 | 1180 | |
| 7463 | 10년 전 | 1235 | ||
| 7462 |
진짜별사탕
|
10년 전 | 849 | |
| 7461 | 10년 전 | 936 | ||
| 7460 | 10년 전 | 3718 | ||
| 7459 |
멋진남자임
|
10년 전 | 1546 | |
| 7458 |
멋진남자임
|
10년 전 | 477 | |
| 7457 | 10년 전 | 912 | ||
| 7456 | 10년 전 | 754 | ||
| 7455 | 10년 전 | 2142 | ||
| 7454 | 10년 전 | 627 | ||
| 7453 | 10년 전 | 818 | ||
| 7452 |
중국어사이트제작
|
10년 전 | 502 | |
| 7451 | 10년 전 | 900 | ||
| 7450 | 10년 전 | 624 | ||
| 7449 |
울라라라우
|
10년 전 | 943 | |
| 7448 | 10년 전 | 1626 | ||
| 7447 |
멋진남자임
|
10년 전 | 493 | |
| 7446 | 10년 전 | 542 | ||
| 7445 |
네이비칼라
|
10년 전 | 1665 | |
| 7444 |
senseme
|
10년 전 | 1397 | |
| 7443 | 10년 전 | 1332 | ||
| 7442 | 10년 전 | 722 | ||
| 7441 |
멋진남자임
|
10년 전 | 1427 | |
| 7440 | 10년 전 | 888 | ||
| 7439 |
|
10년 전 | 745 | |
| 7438 |
|
10년 전 | 924 | |
| 7437 |
basement
|
10년 전 | 1026 | |
| 7436 |
잘살아보자
|
10년 전 | 1118 | |
| 7435 | 10년 전 | 1076 | ||
| 7434 | 10년 전 | 3788 | ||
| 7433 |
|
10년 전 | 2728 | |
| 7432 |
alexkim
|
10년 전 | 856 | |
| 7431 |
이웃집초보
|
11년 전 | 1300 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기