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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 413 | ||
| 7929 | 9년 전 | 331 | ||
| 7928 | 9년 전 | 420 | ||
| 7927 | 9년 전 | 339 | ||
| 7926 | 9년 전 | 668 | ||
| 7925 | 9년 전 | 355 | ||
| 7924 | 9년 전 | 337 | ||
| 7923 | 9년 전 | 346 | ||
| 7922 | 9년 전 | 383 | ||
| 7921 | 9년 전 | 400 | ||
| 7920 | 9년 전 | 322 | ||
| 7919 | 9년 전 | 334 | ||
| 7918 | 9년 전 | 490 | ||
| 7917 | 9년 전 | 333 | ||
| 7916 | 9년 전 | 410 | ||
| 7915 | 9년 전 | 405 | ||
| 7914 | 9년 전 | 416 | ||
| 7913 | 9년 전 | 576 | ||
| 7912 | 9년 전 | 422 | ||
| 7911 | 9년 전 | 368 | ||
| 7910 | 9년 전 | 412 | ||
| 7909 | 9년 전 | 510 | ||
| 7908 | 9년 전 | 429 | ||
| 7907 | 9년 전 | 373 | ||
| 7906 | 9년 전 | 397 | ||
| 7905 | 9년 전 | 375 | ||
| 7904 | 9년 전 | 356 | ||
| 7903 | 9년 전 | 348 | ||
| 7902 | 9년 전 | 564 | ||
| 7901 |
|
9년 전 | 737 | |
| 7900 | 9년 전 | 591 | ||
| 7899 | 9년 전 | 385 | ||
| 7898 | 9년 전 | 387 | ||
| 7897 | 9년 전 | 349 | ||
| 7896 | 9년 전 | 361 | ||
| 7895 | 9년 전 | 468 | ||
| 7894 | 9년 전 | 391 | ||
| 7893 | 9년 전 | 340 | ||
| 7892 | 9년 전 | 396 | ||
| 7891 | 9년 전 | 766 | ||
| 7890 | 9년 전 | 1196 | ||
| 7889 | 9년 전 | 748 | ||
| 7888 |
limsy1987
|
9년 전 | 548 | |
| 7887 | 9년 전 | 550 | ||
| 7886 | 9년 전 | 443 | ||
| 7885 | 9년 전 | 411 | ||
| 7884 | 9년 전 | 412 | ||
| 7883 | 9년 전 | 401 | ||
| 7882 | 9년 전 | 454 | ||
| 7881 | 9년 전 | 443 | ||
| 7880 | 9년 전 | 570 | ||
| 7879 | 9년 전 | 463 | ||
| 7878 | 9년 전 | 1220 | ||
| 7877 | 9년 전 | 752 | ||
| 7876 | 9년 전 | 490 | ||
| 7875 | 9년 전 | 561 | ||
| 7874 |
|
9년 전 | 810 | |
| 7873 | 9년 전 | 524 | ||
| 7872 | 9년 전 | 679 | ||
| 7871 | 9년 전 | 486 | ||
| 7870 | 9년 전 | 609 | ||
| 7869 | 9년 전 | 436 | ||
| 7868 | 9년 전 | 449 | ||
| 7867 | 9년 전 | 430 | ||
| 7866 | 9년 전 | 491 | ||
| 7865 | 9년 전 | 457 | ||
| 7864 | 9년 전 | 514 | ||
| 7863 | 9년 전 | 509 | ||
| 7862 | 9년 전 | 466 | ||
| 7861 | 9년 전 | 640 | ||
| 7860 | 9년 전 | 627 | ||
| 7859 | 9년 전 | 411 | ||
| 7858 | 9년 전 | 704 | ||
| 7857 | 9년 전 | 1080 | ||
| 7856 | 9년 전 | 527 | ||
| 7855 | 9년 전 | 755 | ||
| 7854 | 9년 전 | 732 | ||
| 7853 | 9년 전 | 581 | ||
| 7852 | 9년 전 | 509 | ||
| 7851 | 9년 전 | 508 | ||
| 7850 | 9년 전 | 583 | ||
| 7849 | 9년 전 | 356 | ||
| 7848 | 9년 전 | 412 | ||
| 7847 | 9년 전 | 655 | ||
| 7846 | 9년 전 | 458 | ||
| 7845 | 9년 전 | 420 | ||
| 7844 | 9년 전 | 392 | ||
| 7843 | 9년 전 | 416 | ||
| 7842 | 9년 전 | 400 | ||
| 7841 | 9년 전 | 384 | ||
| 7840 | 9년 전 | 405 | ||
| 7839 | 9년 전 | 436 | ||
| 7838 | 9년 전 | 519 | ||
| 7837 | 9년 전 | 357 | ||
| 7836 | 9년 전 | 399 | ||
| 7835 | 9년 전 | 475 | ||
| 7834 |
|
9년 전 | 1196 | |
| 7833 | 9년 전 | 432 | ||
| 7832 | 9년 전 | 418 | ||
| 7831 | 9년 전 | 564 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기