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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7730 | 10년 전 | 1309 | ||
| 7729 | 10년 전 | 1142 | ||
| 7728 |
잘살아보자
|
10년 전 | 597 | |
| 7727 |
잘살아보자
|
10년 전 | 496 | |
| 7726 |
잘살아보자
|
10년 전 | 820 | |
| 7725 |
잘살아보자
|
10년 전 | 550 | |
| 7724 |
잘살아보자
|
10년 전 | 460 | |
| 7723 |
잘살아보자
|
10년 전 | 529 | |
| 7722 |
잘살아보자
|
10년 전 | 474 | |
| 7721 |
잘살아보자
|
10년 전 | 506 | |
| 7720 |
잘살아보자
|
10년 전 | 461 | |
| 7719 |
비긴어게인
|
10년 전 | 688 | |
| 7718 |
|
10년 전 | 2536 | |
| 7717 |
잘살아보자
|
10년 전 | 647 | |
| 7716 |
잘살아보자
|
10년 전 | 395 | |
| 7715 |
잘살아보자
|
10년 전 | 427 | |
| 7714 |
잘살아보자
|
10년 전 | 494 | |
| 7713 | 10년 전 | 1784 | ||
| 7712 | 10년 전 | 1710 | ||
| 7711 | 10년 전 | 1099 | ||
| 7710 | 10년 전 | 1398 | ||
| 7709 | 10년 전 | 1516 | ||
| 7708 | 10년 전 | 1459 | ||
| 7707 | 10년 전 | 856 | ||
| 7706 |
별지기천사
|
10년 전 | 568 | |
| 7705 | 10년 전 | 1070 | ||
| 7704 |
ICONdesignstudio
|
10년 전 | 615 | |
| 7703 | 10년 전 | 587 | ||
| 7702 |
|
10년 전 | 724 | |
| 7701 | 10년 전 | 1410 | ||
| 7700 | 10년 전 | 1104 | ||
| 7699 | 10년 전 | 581 | ||
| 7698 | 10년 전 | 1139 | ||
| 7697 | 10년 전 | 5163 | ||
| 7696 | 10년 전 | 651 | ||
| 7695 | 10년 전 | 1685 | ||
| 7694 | 10년 전 | 1057 | ||
| 7693 | 10년 전 | 1551 | ||
| 7692 | 10년 전 | 1292 | ||
| 7691 | 10년 전 | 815 | ||
| 7690 | 10년 전 | 1388 | ||
| 7689 | 10년 전 | 1013 | ||
| 7688 | 10년 전 | 612 | ||
| 7687 |
파랑새1597
|
10년 전 | 588 | |
| 7686 | 10년 전 | 848 | ||
| 7685 | 10년 전 | 1339 | ||
| 7684 | 10년 전 | 799 | ||
| 7683 | 10년 전 | 1092 | ||
| 7682 | 10년 전 | 1014 | ||
| 7681 | 10년 전 | 656 | ||
| 7680 | 10년 전 | 989 | ||
| 7679 | 10년 전 | 503 | ||
| 7678 | 10년 전 | 733 | ||
| 7677 | 10년 전 | 634 | ||
| 7676 |
|
10년 전 | 943 | |
| 7675 |
|
10년 전 | 1175 | |
| 7674 | 10년 전 | 1050 | ||
| 7673 | 10년 전 | 753 | ||
| 7672 | 10년 전 | 1091 | ||
| 7671 | 10년 전 | 887 | ||
| 7670 | 10년 전 | 654 | ||
| 7669 |
mashmellow
|
10년 전 | 1231 | |
| 7668 | 10년 전 | 718 | ||
| 7667 | 10년 전 | 1007 | ||
| 7666 |
senseme
|
10년 전 | 653 | |
| 7665 | 10년 전 | 503 | ||
| 7664 | 10년 전 | 1894 | ||
| 7663 |
mixx애교
|
10년 전 | 983 | |
| 7662 | 10년 전 | 1038 | ||
| 7661 |
hkhkah
|
10년 전 | 786 | |
| 7660 | 10년 전 | 1061 | ||
| 7659 |
커네드커네드
|
10년 전 | 930 | |
| 7658 |
바람돌이팡
|
10년 전 | 672 | |
| 7657 | 10년 전 | 1165 | ||
| 7656 | 10년 전 | 1569 | ||
| 7655 | 10년 전 | 985 | ||
| 7654 |
개발짜증나
|
10년 전 | 856 | |
| 7653 |
네이비칼라
|
10년 전 | 879 | |
| 7652 |
밥먹고합시다
|
10년 전 | 815 | |
| 7651 |
플라이SINJI
|
10년 전 | 1510 | |
| 7650 |
개발짜증나
|
10년 전 | 1415 | |
| 7649 | 10년 전 | 453 | ||
| 7648 |
이미영ㅇㅇ
|
10년 전 | 863 | |
| 7647 | 10년 전 | 435 | ||
| 7646 | 10년 전 | 803 | ||
| 7645 | 10년 전 | 2319 | ||
| 7644 | 10년 전 | 819 | ||
| 7643 |
|
10년 전 | 2872 | |
| 7642 | 10년 전 | 1509 | ||
| 7641 | 10년 전 | 1140 | ||
| 7640 |
개발짜증나
|
10년 전 | 473 | |
| 7639 |
|
10년 전 | 811 | |
| 7638 |
개발짜증나
|
10년 전 | 1132 | |
| 7637 | 10년 전 | 1547 | ||
| 7636 | 10년 전 | 2915 | ||
| 7635 | 10년 전 | 1693 | ||
| 7634 | 10년 전 | 1882 | ||
| 7633 | 10년 전 | 2335 | ||
| 7632 | 10년 전 | 3943 | ||
| 7631 |
|
10년 전 | 1532 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기