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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1030 | 18년 전 | 1793 | ||
| 1029 | 18년 전 | 2228 | ||
| 1028 | 18년 전 | 2636 | ||
| 1027 | 18년 전 | 1801 | ||
| 1026 | 18년 전 | 1538 | ||
| 1025 | 18년 전 | 1545 | ||
| 1024 | 18년 전 | 1470 | ||
| 1023 | 18년 전 | 3231 | ||
| 1022 | 18년 전 | 2921 | ||
| 1021 | 18년 전 | 1681 | ||
| 1020 | 18년 전 | 3423 | ||
| 1019 | 18년 전 | 1846 | ||
| 1018 | 18년 전 | 1498 | ||
| 1017 | 18년 전 | 1965 | ||
| 1016 | 18년 전 | 2103 | ||
| 1015 | 18년 전 | 1642 | ||
| 1014 | 18년 전 | 2352 | ||
| 1013 | 18년 전 | 2009 | ||
| 1012 | 18년 전 | 1633 | ||
| 1011 | 18년 전 | 1788 | ||
| 1010 | 18년 전 | 2047 | ||
| 1009 | 18년 전 | 1809 | ||
| 1008 | 18년 전 | 1625 | ||
| 1007 | 18년 전 | 1671 | ||
| 1006 | 18년 전 | 3140 | ||
| 1005 | 18년 전 | 2007 | ||
| 1004 | 18년 전 | 1877 | ||
| 1003 | 18년 전 | 4372 | ||
| 1002 | 18년 전 | 4999 | ||
| 1001 | 18년 전 | 3169 | ||
| 1000 | 18년 전 | 2917 | ||
| 999 | 19년 전 | 3506 | ||
| 998 | 19년 전 | 2055 | ||
| 997 | 19년 전 | 2418 | ||
| 996 | 19년 전 | 2707 | ||
| 995 | 19년 전 | 2767 | ||
| 994 | 19년 전 | 2354 | ||
| 993 | 19년 전 | 1624 | ||
| 992 | 19년 전 | 3387 | ||
| 991 | 19년 전 | 1998 | ||
| 990 | 19년 전 | 2393 | ||
| 989 | 19년 전 | 2464 | ||
| 988 | 19년 전 | 2893 | ||
| 987 | 19년 전 | 5227 | ||
| 986 |
|
19년 전 | 2500 | |
| 985 |
|
19년 전 | 3351 | |
| 984 | 19년 전 | 4280 | ||
| 983 |
느낌좋은날
|
19년 전 | 2512 | |
| 982 | 19년 전 | 2476 | ||
| 981 | 19년 전 | 4044 | ||
| 980 | 19년 전 | 2753 | ||
| 979 |
Sinpre
|
19년 전 | 3004 | |
| 978 | 19년 전 | 2214 | ||
| 977 | 19년 전 | 2225 | ||
| 976 | 19년 전 | 1996 | ||
| 975 | 19년 전 | 3277 | ||
| 974 | 19년 전 | 2114 | ||
| 973 |
|
19년 전 | 2798 | |
| 972 |
|
19년 전 | 1750 | |
| 971 | 19년 전 | 5324 | ||
| 970 | 19년 전 | 3581 | ||
| 969 | 19년 전 | 4330 | ||
| 968 | 19년 전 | 3074 | ||
| 967 | 19년 전 | 2532 | ||
| 966 | 19년 전 | 3933 | ||
| 965 | 19년 전 | 2666 | ||
| 964 | 19년 전 | 3002 | ||
| 963 | 19년 전 | 2973 | ||
| 962 | 19년 전 | 4191 | ||
| 961 | 19년 전 | 3133 | ||
| 960 | 19년 전 | 3032 | ||
| 959 | 19년 전 | 3687 | ||
| 958 | 19년 전 | 2981 | ||
| 957 | 19년 전 | 2195 | ||
| 956 | 19년 전 | 2227 | ||
| 955 | 19년 전 | 2184 | ||
| 954 | 19년 전 | 2776 | ||
| 953 | 19년 전 | 2484 | ||
| 952 | 19년 전 | 3356 | ||
| 951 | 19년 전 | 3215 | ||
| 950 | 19년 전 | 1829 | ||
| 949 | 19년 전 | 2742 | ||
| 948 | 19년 전 | 7830 | ||
| 947 |
|
19년 전 | 2505 | |
| 946 |
DeepnBlue
|
19년 전 | 3118 | |
| 945 |
pearly
|
19년 전 | 2893 | |
| 944 | 19년 전 | 3032 | ||
| 943 |
|
19년 전 | 2240 | |
| 942 | 19년 전 | 2456 | ||
| 941 |
|
19년 전 | 4080 | |
| 940 | 19년 전 | 2235 | ||
| 939 |
|
19년 전 | 4222 | |
| 938 |
|
19년 전 | 2388 | |
| 937 | 19년 전 | 2087 | ||
| 936 |
|
19년 전 | 2333 | |
| 935 | 19년 전 | 1881 | ||
| 934 |
|
19년 전 | 2413 | |
| 933 | 19년 전 | 2207 | ||
| 932 |
|
19년 전 | 3078 | |
| 931 | 19년 전 | 1867 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기