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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 10년 전 | 462 | ||
| 7829 |
|
10년 전 | 649 | |
| 7828 | 10년 전 | 572 | ||
| 7827 | 10년 전 | 474 | ||
| 7826 | 10년 전 | 496 | ||
| 7825 | 10년 전 | 528 | ||
| 7824 | 10년 전 | 487 | ||
| 7823 | 10년 전 | 429 | ||
| 7822 | 10년 전 | 405 | ||
| 7821 | 10년 전 | 347 | ||
| 7820 | 10년 전 | 370 | ||
| 7819 |
|
10년 전 | 769 | |
| 7818 | 10년 전 | 428 | ||
| 7817 | 10년 전 | 607 | ||
| 7816 | 10년 전 | 446 | ||
| 7815 | 10년 전 | 641 | ||
| 7814 | 10년 전 | 478 | ||
| 7813 | 10년 전 | 434 | ||
| 7812 | 10년 전 | 443 | ||
| 7811 | 10년 전 | 419 | ||
| 7810 | 10년 전 | 622 | ||
| 7809 | 10년 전 | 553 | ||
| 7808 | 10년 전 | 434 | ||
| 7807 | 10년 전 | 443 | ||
| 7806 |
프로그래머7
|
10년 전 | 1364 | |
| 7805 | 10년 전 | 1309 | ||
| 7804 |
zahir1312
|
10년 전 | 805 | |
| 7803 |
|
10년 전 | 1405 | |
| 7802 | 10년 전 | 506 | ||
| 7801 | 10년 전 | 885 | ||
| 7800 | 10년 전 | 1111 | ||
| 7799 | 10년 전 | 594 | ||
| 7798 | 10년 전 | 541 | ||
| 7797 | 10년 전 | 561 | ||
| 7796 | 10년 전 | 397 | ||
| 7795 | 10년 전 | 549 | ||
| 7794 | 10년 전 | 592 | ||
| 7793 | 10년 전 | 1089 | ||
| 7792 | 10년 전 | 517 | ||
| 7791 | 10년 전 | 612 | ||
| 7790 | 10년 전 | 534 | ||
| 7789 |
fbastore
|
10년 전 | 1487 | |
| 7788 | 10년 전 | 591 | ||
| 7787 | 10년 전 | 448 | ||
| 7786 | 10년 전 | 654 | ||
| 7785 | 10년 전 | 629 | ||
| 7784 | 10년 전 | 692 | ||
| 7783 | 10년 전 | 512 | ||
| 7782 | 10년 전 | 536 | ||
| 7781 | 10년 전 | 938 | ||
| 7780 | 10년 전 | 847 | ||
| 7779 | 10년 전 | 799 | ||
| 7778 | 10년 전 | 393 | ||
| 7777 | 10년 전 | 506 | ||
| 7776 | 10년 전 | 501 | ||
| 7775 | 10년 전 | 437 | ||
| 7774 | 10년 전 | 647 | ||
| 7773 | 10년 전 | 403 | ||
| 7772 | 10년 전 | 778 | ||
| 7771 | 10년 전 | 437 | ||
| 7770 | 10년 전 | 674 | ||
| 7769 | 10년 전 | 434 | ||
| 7768 | 10년 전 | 655 | ||
| 7767 | 10년 전 | 1207 | ||
| 7766 | 10년 전 | 537 | ||
| 7765 | 10년 전 | 597 | ||
| 7764 |
잘살아보자
|
10년 전 | 455 | |
| 7763 |
|
10년 전 | 1503 | |
| 7762 |
Tosea
|
10년 전 | 1088 | |
| 7761 | 10년 전 | 692 | ||
| 7760 |
잘살아보자
|
10년 전 | 765 | |
| 7759 |
잘살아보자
|
10년 전 | 603 | |
| 7758 |
잘살아보자
|
10년 전 | 660 | |
| 7757 | 10년 전 | 1290 | ||
| 7756 |
ITBANK
|
10년 전 | 1290 | |
| 7755 | 10년 전 | 1945 | ||
| 7754 | 10년 전 | 1104 | ||
| 7753 | 10년 전 | 923 | ||
| 7752 | 10년 전 | 1425 | ||
| 7751 |
잘살아보자
|
10년 전 | 581 | |
| 7750 |
잘살아보자
|
10년 전 | 510 | |
| 7749 |
잘살아보자
|
10년 전 | 535 | |
| 7748 |
잘살아보자
|
10년 전 | 561 | |
| 7747 |
잘살아보자
|
10년 전 | 639 | |
| 7746 |
잘살아보자
|
10년 전 | 701 | |
| 7745 |
잘살아보자
|
10년 전 | 951 | |
| 7744 |
잘살아보자
|
10년 전 | 441 | |
| 7743 | 10년 전 | 972 | ||
| 7742 |
starbros
|
10년 전 | 866 | |
| 7741 |
잘살아보자
|
10년 전 | 709 | |
| 7740 |
잘살아보자
|
10년 전 | 598 | |
| 7739 |
잘살아보자
|
10년 전 | 487 | |
| 7738 |
잘살아보자
|
10년 전 | 564 | |
| 7737 |
잘살아보자
|
10년 전 | 542 | |
| 7736 |
잘살아보자
|
10년 전 | 562 | |
| 7735 |
잘살아보자
|
10년 전 | 899 | |
| 7734 |
잘살아보자
|
10년 전 | 455 | |
| 7733 |
잘살아보자
|
10년 전 | 566 | |
| 7732 |
잘살아보자
|
10년 전 | 731 | |
| 7731 |
잘살아보자
|
10년 전 | 655 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기