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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 830 |
|
19년 전 | 2184 | |
| 829 |
|
19년 전 | 1915 | |
| 828 |
|
19년 전 | 1807 | |
| 827 |
|
19년 전 | 1654 | |
| 826 |
|
19년 전 | 1847 | |
| 825 |
|
19년 전 | 1888 | |
| 824 |
|
19년 전 | 1943 | |
| 823 |
|
19년 전 | 2687 | |
| 822 |
|
19년 전 | 5316 | |
| 821 |
|
19년 전 | 1721 | |
| 820 |
|
19년 전 | 1573 | |
| 819 |
|
19년 전 | 1435 | |
| 818 |
|
19년 전 | 1597 | |
| 817 |
|
19년 전 | 1521 | |
| 816 |
|
19년 전 | 1444 | |
| 815 |
|
19년 전 | 1457 | |
| 814 |
|
19년 전 | 1378 | |
| 813 |
|
19년 전 | 1442 | |
| 812 | 19년 전 | 2816 | ||
| 811 |
pearly
|
19년 전 | 3833 | |
| 810 |
pearly
|
19년 전 | 5209 | |
| 809 |
|
19년 전 | 1375 | |
| 808 |
pearly
|
19년 전 | 4539 | |
| 807 | 19년 전 | 2979 | ||
| 806 |
|
19년 전 | 1498 | |
| 805 |
|
19년 전 | 2690 | |
| 804 |
|
19년 전 | 3616 | |
| 803 |
|
19년 전 | 1799 | |
| 802 |
|
19년 전 | 3789 | |
| 801 |
|
19년 전 | 1881 | |
| 800 | 19년 전 | 3770 | ||
| 799 | 19년 전 | 3431 | ||
| 798 | 19년 전 | 4204 | ||
| 797 | 19년 전 | 4058 | ||
| 796 |
|
19년 전 | 1895 | |
| 795 |
|
19년 전 | 1849 | |
| 794 | 19년 전 | 4274 | ||
| 793 | 19년 전 | 2667 | ||
| 792 | 19년 전 | 2544 | ||
| 791 | 19년 전 | 2394 | ||
| 790 | 19년 전 | 1970 | ||
| 789 | 19년 전 | 2589 | ||
| 788 | 19년 전 | 2205 | ||
| 787 | 19년 전 | 1845 | ||
| 786 | 19년 전 | 1971 | ||
| 785 | 19년 전 | 1441 | ||
| 784 |
|
19년 전 | 1693 | |
| 783 | 19년 전 | 2835 | ||
| 782 |
|
19년 전 | 1956 | |
| 781 | 19년 전 | 3247 | ||
| 780 | 19년 전 | 3155 | ||
| 779 |
|
19년 전 | 2242 | |
| 778 |
|
19년 전 | 1795 | |
| 777 | 19년 전 | 2836 | ||
| 776 | 19년 전 | 2899 | ||
| 775 | 19년 전 | 4016 | ||
| 774 |
|
19년 전 | 1974 | |
| 773 | 19년 전 | 2620 | ||
| 772 | 19년 전 | 2337 | ||
| 771 | 19년 전 | 3469 | ||
| 770 |
|
19년 전 | 1430 | |
| 769 | 19년 전 | 1495 | ||
| 768 | 19년 전 | 1767 | ||
| 767 | 19년 전 | 2202 | ||
| 766 | 19년 전 | 1832 | ||
| 765 | 19년 전 | 1693 | ||
| 764 |
|
19년 전 | 2107 | |
| 763 |
|
19년 전 | 2215 | |
| 762 |
|
19년 전 | 4963 | |
| 761 | 19년 전 | 2326 | ||
| 760 |
|
19년 전 | 3192 | |
| 759 | 19년 전 | 2640 | ||
| 758 |
|
19년 전 | 2405 | |
| 757 | 19년 전 | 4697 | ||
| 756 | 19년 전 | 2560 | ||
| 755 |
|
19년 전 | 2412 | |
| 754 |
|
19년 전 | 1950 | |
| 753 |
|
19년 전 | 1733 | |
| 752 |
pearly
|
19년 전 | 3367 | |
| 751 | 19년 전 | 2343 | ||
| 750 |
|
19년 전 | 6157 | |
| 749 | 19년 전 | 2025 | ||
| 748 |
|
19년 전 | 1901 | |
| 747 |
|
19년 전 | 2704 | |
| 746 |
|
19년 전 | 1812 | |
| 745 | 19년 전 | 2281 | ||
| 744 | 19년 전 | 2111 | ||
| 743 |
|
19년 전 | 3563 | |
| 742 | 19년 전 | 2578 | ||
| 741 | 19년 전 | 2745 | ||
| 740 |
|
19년 전 | 4364 | |
| 739 | 19년 전 | 3547 | ||
| 738 |
|
19년 전 | 2306 | |
| 737 | 19년 전 | 4308 | ||
| 736 | 19년 전 | 3266 | ||
| 735 |
홀로남은자
|
19년 전 | 4135 | |
| 734 |
홀로남은자
|
19년 전 | 2022 | |
| 733 |
홀로남은자
|
19년 전 | 2227 | |
| 732 | 19년 전 | 2139 | ||
| 731 | 19년 전 | 3353 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기