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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 730 |
|
19년 전 | 2723 | |
| 729 |
그레이스웹
|
19년 전 | 3514 | |
| 728 |
|
19년 전 | 2684 | |
| 727 |
|
19년 전 | 2523 | |
| 726 |
|
19년 전 | 2340 | |
| 725 |
|
19년 전 | 2239 | |
| 724 |
|
19년 전 | 2132 | |
| 723 |
|
19년 전 | 4255 | |
| 722 |
|
19년 전 | 2669 | |
| 721 |
|
19년 전 | 2163 | |
| 720 |
|
19년 전 | 2259 | |
| 719 |
|
19년 전 | 2844 | |
| 718 |
|
19년 전 | 1960 | |
| 717 |
|
19년 전 | 3195 | |
| 716 |
|
19년 전 | 2752 | |
| 715 |
|
19년 전 | 2263 | |
| 714 |
|
19년 전 | 1818 | |
| 713 |
|
19년 전 | 2237 | |
| 712 |
|
19년 전 | 2010 | |
| 711 |
|
19년 전 | 1905 | |
| 710 |
|
19년 전 | 2465 | |
| 709 |
|
19년 전 | 2327 | |
| 708 |
|
19년 전 | 3884 | |
| 707 |
|
19년 전 | 3735 | |
| 706 |
|
19년 전 | 2236 | |
| 705 |
|
19년 전 | 3288 | |
| 704 |
|
19년 전 | 1957 | |
| 703 |
|
19년 전 | 2382 | |
| 702 |
|
19년 전 | 2277 | |
| 701 |
홀로남은자
|
19년 전 | 2345 | |
| 700 |
홀로남은자
|
19년 전 | 2179 | |
| 699 | 19년 전 | 2814 | ||
| 698 |
|
19년 전 | 2832 | |
| 697 |
|
19년 전 | 3171 | |
| 696 |
|
19년 전 | 3043 | |
| 695 |
|
19년 전 | 2704 | |
| 694 |
|
19년 전 | 2931 | |
| 693 |
|
19년 전 | 3184 | |
| 692 |
|
19년 전 | 2877 | |
| 691 |
|
19년 전 | 2626 | |
| 690 | 19년 전 | 2926 | ||
| 689 | 19년 전 | 4510 | ||
| 688 | 19년 전 | 2436 | ||
| 687 | 19년 전 | 2449 | ||
| 686 | 19년 전 | 3477 | ||
| 685 | 19년 전 | 3162 | ||
| 684 | 19년 전 | 2812 | ||
| 683 | 19년 전 | 2053 | ||
| 682 | 19년 전 | 1774 | ||
| 681 | 19년 전 | 2876 | ||
| 680 | 19년 전 | 1718 | ||
| 679 | 19년 전 | 2311 | ||
| 678 | 19년 전 | 3960 | ||
| 677 | 19년 전 | 3734 | ||
| 676 | 19년 전 | 3458 | ||
| 675 | 19년 전 | 3407 | ||
| 674 |
|
19년 전 | 1566 | |
| 673 |
|
19년 전 | 1939 | |
| 672 |
|
19년 전 | 1860 | |
| 671 | 19년 전 | 2523 | ||
| 670 | 19년 전 | 4622 | ||
| 669 |
|
19년 전 | 2762 | |
| 668 |
|
19년 전 | 1919 | |
| 667 |
|
19년 전 | 1935 | |
| 666 |
|
19년 전 | 1827 | |
| 665 |
|
19년 전 | 2563 | |
| 664 |
|
19년 전 | 8175 | |
| 663 |
|
19년 전 | 2725 | |
| 662 |
|
19년 전 | 2788 | |
| 661 |
|
19년 전 | 3045 | |
| 660 |
|
19년 전 | 2202 | |
| 659 |
|
19년 전 | 2210 | |
| 658 |
|
19년 전 | 2171 | |
| 657 |
|
19년 전 | 2074 | |
| 656 |
|
19년 전 | 2265 | |
| 655 |
|
19년 전 | 2523 | |
| 654 |
|
19년 전 | 3076 | |
| 653 | 19년 전 | 2329 | ||
| 652 | 19년 전 | 1911 | ||
| 651 |
|
19년 전 | 2834 | |
| 650 | 19년 전 | 5004 | ||
| 649 | 19년 전 | 3500 | ||
| 648 | 19년 전 | 3457 | ||
| 647 | 19년 전 | 2973 | ||
| 646 | 19년 전 | 2394 | ||
| 645 | 19년 전 | 1489 | ||
| 644 | 19년 전 | 3133 | ||
| 643 | 19년 전 | 2014 | ||
| 642 |
|
19년 전 | 5383 | |
| 641 | 19년 전 | 2432 | ||
| 640 | 19년 전 | 3430 | ||
| 639 | 19년 전 | 2860 | ||
| 638 | 19년 전 | 1761 | ||
| 637 | 19년 전 | 3880 | ||
| 636 | 19년 전 | 2421 | ||
| 635 | 19년 전 | 2313 | ||
| 634 |
|
19년 전 | 3025 | |
| 633 |
|
19년 전 | 3301 | |
| 632 | 19년 전 | 2498 | ||
| 631 | 19년 전 | 2260 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기