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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3543 | ||
| 929 |
|
19년 전 | 2705 | |
| 928 |
|
19년 전 | 3455 | |
| 927 |
|
19년 전 | 3442 | |
| 926 |
|
19년 전 | 3148 | |
| 925 | 19년 전 | 5434 | ||
| 924 |
|
19년 전 | 2168 | |
| 923 |
|
19년 전 | 2220 | |
| 922 |
|
19년 전 | 2314 | |
| 921 |
|
19년 전 | 3407 | |
| 920 | 19년 전 | 3708 | ||
| 919 |
|
19년 전 | 3746 | |
| 918 |
|
19년 전 | 2366 | |
| 917 |
|
19년 전 | 2400 | |
| 916 |
|
19년 전 | 2704 | |
| 915 | 19년 전 | 3046 | ||
| 914 | 19년 전 | 2460 | ||
| 913 | 19년 전 | 2627 | ||
| 912 | 19년 전 | 2461 | ||
| 911 | 19년 전 | 2216 | ||
| 910 | 19년 전 | 3246 | ||
| 909 | 19년 전 | 3302 | ||
| 908 | 19년 전 | 3040 | ||
| 907 |
|
19년 전 | 4874 | |
| 906 |
|
19년 전 | 2714 | |
| 905 |
|
19년 전 | 3317 | |
| 904 |
|
19년 전 | 3148 | |
| 903 |
|
19년 전 | 1996 | |
| 902 |
|
19년 전 | 3142 | |
| 901 |
|
19년 전 | 1878 | |
| 900 |
|
19년 전 | 2337 | |
| 899 |
|
19년 전 | 2404 | |
| 898 |
|
19년 전 | 3985 | |
| 897 |
|
19년 전 | 3186 | |
| 896 |
|
19년 전 | 3101 | |
| 895 |
|
19년 전 | 2539 | |
| 894 |
|
19년 전 | 2016 | |
| 893 |
|
19년 전 | 1648 | |
| 892 |
|
19년 전 | 2416 | |
| 891 |
|
19년 전 | 2330 | |
| 890 |
|
19년 전 | 1815 | |
| 889 |
|
19년 전 | 1811 | |
| 888 |
|
19년 전 | 2611 | |
| 887 |
|
19년 전 | 2581 | |
| 886 |
|
19년 전 | 1875 | |
| 885 |
|
19년 전 | 2112 | |
| 884 |
|
19년 전 | 3304 | |
| 883 |
|
19년 전 | 1952 | |
| 882 |
|
19년 전 | 2502 | |
| 881 |
|
19년 전 | 2581 | |
| 880 |
|
19년 전 | 2664 | |
| 879 |
|
19년 전 | 2939 | |
| 878 |
|
19년 전 | 2559 | |
| 877 |
|
19년 전 | 2984 | |
| 876 |
|
19년 전 | 2762 | |
| 875 |
|
19년 전 | 3522 | |
| 874 | 19년 전 | 1872 | ||
| 873 | 19년 전 | 2735 | ||
| 872 |
|
19년 전 | 2375 | |
| 871 |
|
19년 전 | 2019 | |
| 870 |
|
19년 전 | 2427 | |
| 869 |
|
19년 전 | 1871 | |
| 868 |
|
19년 전 | 5440 | |
| 867 |
|
19년 전 | 2264 | |
| 866 |
|
19년 전 | 4260 | |
| 865 |
|
19년 전 | 2303 | |
| 864 | 19년 전 | 1850 | ||
| 863 | 19년 전 | 2606 | ||
| 862 | 19년 전 | 2332 | ||
| 861 | 19년 전 | 2534 | ||
| 860 | 19년 전 | 2162 | ||
| 859 | 19년 전 | 3927 | ||
| 858 | 19년 전 | 3418 | ||
| 857 | 19년 전 | 2198 | ||
| 856 |
Power
|
19년 전 | 2107 | |
| 855 | 19년 전 | 1972 | ||
| 854 | 19년 전 | 2004 | ||
| 853 |
pearly
|
19년 전 | 4388 | |
| 852 |
pearly
|
19년 전 | 3358 | |
| 851 | 19년 전 | 2774 | ||
| 850 |
pearly
|
19년 전 | 3354 | |
| 849 |
pearly
|
19년 전 | 3013 | |
| 848 |
pearly
|
19년 전 | 2842 | |
| 847 | 19년 전 | 2364 | ||
| 846 |
|
19년 전 | 2172 | |
| 845 |
pearly
|
19년 전 | 2493 | |
| 844 | 19년 전 | 3105 | ||
| 843 | 19년 전 | 2133 | ||
| 842 |
pearly
|
19년 전 | 3123 | |
| 841 |
pearly
|
19년 전 | 3245 | |
| 840 | 19년 전 | 2928 | ||
| 839 |
|
19년 전 | 1941 | |
| 838 |
|
19년 전 | 1707 | |
| 837 |
|
19년 전 | 2328 | |
| 836 |
|
19년 전 | 2271 | |
| 835 |
|
19년 전 | 1648 | |
| 834 |
|
19년 전 | 1666 | |
| 833 |
|
19년 전 | 1574 | |
| 832 |
|
19년 전 | 2067 | |
| 831 |
|
19년 전 | 1616 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기