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년 전 | 2725 | |
| 729 |
그레이스웹
|
19년 전 | 3517 | |
| 728 |
|
19년 전 | 2691 | |
| 727 |
|
19년 전 | 2531 | |
| 726 |
|
19년 전 | 2346 | |
| 725 |
|
19년 전 | 2251 | |
| 724 |
|
19년 전 | 2137 | |
| 723 |
|
19년 전 | 4258 | |
| 722 |
|
19년 전 | 2676 | |
| 721 |
|
19년 전 | 2166 | |
| 720 |
|
19년 전 | 2263 | |
| 719 |
|
19년 전 | 2852 | |
| 718 |
|
19년 전 | 1963 | |
| 717 |
|
19년 전 | 3197 | |
| 716 |
|
19년 전 | 2755 | |
| 715 |
|
19년 전 | 2273 | |
| 714 |
|
19년 전 | 1824 | |
| 713 |
|
19년 전 | 2242 | |
| 712 |
|
19년 전 | 2013 | |
| 711 |
|
19년 전 | 1908 | |
| 710 |
|
19년 전 | 2472 | |
| 709 |
|
19년 전 | 2335 | |
| 708 |
|
19년 전 | 3896 | |
| 707 |
|
19년 전 | 3742 | |
| 706 |
|
19년 전 | 2239 | |
| 705 |
|
19년 전 | 3308 | |
| 704 |
|
19년 전 | 1976 | |
| 703 |
|
19년 전 | 2385 | |
| 702 |
|
19년 전 | 2280 | |
| 701 |
홀로남은자
|
19년 전 | 2348 | |
| 700 |
홀로남은자
|
19년 전 | 2182 | |
| 699 | 19년 전 | 2817 | ||
| 698 |
|
19년 전 | 2842 | |
| 697 |
|
19년 전 | 3174 | |
| 696 |
|
19년 전 | 3047 | |
| 695 |
|
19년 전 | 2710 | |
| 694 |
|
19년 전 | 2945 | |
| 693 |
|
19년 전 | 3192 | |
| 692 |
|
19년 전 | 2881 | |
| 691 |
|
19년 전 | 2629 | |
| 690 | 19년 전 | 2929 | ||
| 689 | 19년 전 | 4515 | ||
| 688 | 19년 전 | 2440 | ||
| 687 | 19년 전 | 2452 | ||
| 686 | 19년 전 | 3481 | ||
| 685 | 19년 전 | 3169 | ||
| 684 | 19년 전 | 2826 | ||
| 683 | 19년 전 | 2060 | ||
| 682 | 19년 전 | 1776 | ||
| 681 | 19년 전 | 2876 | ||
| 680 | 19년 전 | 1723 | ||
| 679 | 19년 전 | 2312 | ||
| 678 | 19년 전 | 3964 | ||
| 677 | 19년 전 | 3739 | ||
| 676 | 19년 전 | 3469 | ||
| 675 | 19년 전 | 3410 | ||
| 674 |
|
19년 전 | 1568 | |
| 673 |
|
19년 전 | 1939 | |
| 672 |
|
19년 전 | 1864 | |
| 671 | 19년 전 | 2528 | ||
| 670 | 19년 전 | 4632 | ||
| 669 |
|
19년 전 | 2768 | |
| 668 |
|
19년 전 | 1926 | |
| 667 |
|
19년 전 | 1938 | |
| 666 |
|
19년 전 | 1839 | |
| 665 |
|
19년 전 | 2577 | |
| 664 |
|
19년 전 | 8179 | |
| 663 |
|
19년 전 | 2732 | |
| 662 |
|
19년 전 | 2791 | |
| 661 |
|
19년 전 | 3045 | |
| 660 |
|
19년 전 | 2214 | |
| 659 |
|
19년 전 | 2227 | |
| 658 |
|
19년 전 | 2174 | |
| 657 |
|
19년 전 | 2084 | |
| 656 |
|
19년 전 | 2270 | |
| 655 |
|
19년 전 | 2535 | |
| 654 |
|
19년 전 | 3080 | |
| 653 | 19년 전 | 2332 | ||
| 652 | 19년 전 | 1917 | ||
| 651 |
|
19년 전 | 2845 | |
| 650 | 19년 전 | 5013 | ||
| 649 | 19년 전 | 3506 | ||
| 648 | 19년 전 | 3463 | ||
| 647 | 19년 전 | 2976 | ||
| 646 | 19년 전 | 2405 | ||
| 645 | 19년 전 | 1499 | ||
| 644 | 19년 전 | 3141 | ||
| 643 | 19년 전 | 2022 | ||
| 642 |
|
19년 전 | 5391 | |
| 641 | 19년 전 | 2436 | ||
| 640 | 19년 전 | 3435 | ||
| 639 | 19년 전 | 2866 | ||
| 638 | 19년 전 | 1766 | ||
| 637 | 19년 전 | 3880 | ||
| 636 | 19년 전 | 2428 | ||
| 635 | 19년 전 | 2318 | ||
| 634 |
|
19년 전 | 3025 | |
| 633 |
|
19년 전 | 3303 | |
| 632 | 19년 전 | 2505 | ||
| 631 | 19년 전 | 2267 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기