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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 652 | ||
| 7629 |
|
10년 전 | 2391 | |
| 7628 | 10년 전 | 793 | ||
| 7627 |
|
10년 전 | 1032 | |
| 7626 |
|
10년 전 | 1788 | |
| 7625 | 10년 전 | 711 | ||
| 7624 | 10년 전 | 726 | ||
| 7623 |
|
10년 전 | 3094 | |
| 7622 | 10년 전 | 728 | ||
| 7621 |
leeleeleelee
|
10년 전 | 586 | |
| 7620 | 10년 전 | 540 | ||
| 7619 | 10년 전 | 491 | ||
| 7618 | 10년 전 | 1026 | ||
| 7617 | 10년 전 | 726 | ||
| 7616 | 10년 전 | 650 | ||
| 7615 | 10년 전 | 727 | ||
| 7614 | 10년 전 | 1264 | ||
| 7613 |
|
10년 전 | 2085 | |
| 7612 | 10년 전 | 1146 | ||
| 7611 | 10년 전 | 1418 | ||
| 7610 |
|
10년 전 | 1904 | |
| 7609 |
|
10년 전 | 1345 | |
| 7608 |
mwdkim
|
10년 전 | 1131 | |
| 7607 |
|
10년 전 | 1054 | |
| 7606 |
mwdkim
|
10년 전 | 3928 | |
| 7605 | 10년 전 | 692 | ||
| 7604 | 10년 전 | 1028 | ||
| 7603 | 10년 전 | 1654 | ||
| 7602 |
|
10년 전 | 1078 | |
| 7601 |
AniNest
|
10년 전 | 2793 | |
| 7600 |
port443
|
10년 전 | 1034 | |
| 7599 | 10년 전 | 947 | ||
| 7598 | 10년 전 | 1022 | ||
| 7597 | 10년 전 | 4577 | ||
| 7596 |
SeungYeon
|
10년 전 | 893 | |
| 7595 |
untitled
|
10년 전 | 2426 | |
| 7594 |
프로그래머7
|
10년 전 | 1729 | |
| 7593 |
untitled
|
10년 전 | 2366 | |
| 7592 |
untitled
|
10년 전 | 1944 | |
| 7591 |
untitled
|
10년 전 | 2678 | |
| 7590 |
아리마2001
|
10년 전 | 854 | |
| 7589 | 10년 전 | 1111 | ||
| 7588 |
|
10년 전 | 2921 | |
| 7587 | 10년 전 | 1305 | ||
| 7586 | 10년 전 | 672 | ||
| 7585 | 10년 전 | 1695 | ||
| 7584 | 10년 전 | 1414 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1164 | |
| 7582 |
|
10년 전 | 1114 | |
| 7581 | 10년 전 | 1350 | ||
| 7580 | 10년 전 | 997 | ||
| 7579 |
|
10년 전 | 610 | |
| 7578 | 10년 전 | 1430 | ||
| 7577 |
|
10년 전 | 1872 | |
| 7576 | 10년 전 | 1387 | ||
| 7575 |
멋진남자임
|
10년 전 | 1465 | |
| 7574 | 10년 전 | 2123 | ||
| 7573 | 10년 전 | 3259 | ||
| 7572 | 10년 전 | 761 | ||
| 7571 |
|
10년 전 | 784 | |
| 7570 |
|
10년 전 | 1318 | |
| 7569 | 10년 전 | 1553 | ||
| 7568 |
this1mg
|
10년 전 | 1053 | |
| 7567 |
|
10년 전 | 764 | |
| 7566 | 10년 전 | 918 | ||
| 7565 |
Angel하늘
|
10년 전 | 1010 | |
| 7564 |
seoldi
|
10년 전 | 1241 | |
| 7563 |
|
10년 전 | 1385 | |
| 7562 |
멋진남자임
|
10년 전 | 2088 | |
| 7561 | 10년 전 | 714 | ||
| 7560 |
leeleeleelee
|
10년 전 | 905 | |
| 7559 | 10년 전 | 5049 | ||
| 7558 |
RinaP
|
10년 전 | 786 | |
| 7557 |
|
10년 전 | 1247 | |
| 7556 | 10년 전 | 1194 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1666 | |
| 7554 | 10년 전 | 1094 | ||
| 7553 |
senseme
|
10년 전 | 1340 | |
| 7552 |
ehdltdoit
|
10년 전 | 1437 | |
| 7551 |
|
10년 전 | 1826 | |
| 7550 |
leeleeleelee
|
10년 전 | 1593 | |
| 7549 | 10년 전 | 2426 | ||
| 7548 | 10년 전 | 1845 | ||
| 7547 |
멋진남자임
|
10년 전 | 1963 | |
| 7546 | 10년 전 | 1006 | ||
| 7545 |
ILMare1003
|
10년 전 | 1291 | |
| 7544 |
|
10년 전 | 1254 | |
| 7543 | 10년 전 | 886 | ||
| 7542 | 10년 전 | 657 | ||
| 7541 |
울라라라우
|
10년 전 | 866 | |
| 7540 | 10년 전 | 1600 | ||
| 7539 | 10년 전 | 936 | ||
| 7538 |
|
10년 전 | 1834 | |
| 7537 | 10년 전 | 3611 | ||
| 7536 |
Gaumi
|
10년 전 | 1416 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1275 | |
| 7534 |
senseme
|
10년 전 | 1207 | |
| 7533 | 10년 전 | 1200 | ||
| 7532 | 10년 전 | 859 | ||
| 7531 | 10년 전 | 2057 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기