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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 630 | 19년 전 | 2334 | ||
| 629 |
|
19년 전 | 1998 | |
| 628 |
|
19년 전 | 3106 | |
| 627 |
|
19년 전 | 2013 | |
| 626 |
|
19년 전 | 2059 | |
| 625 |
|
19년 전 | 1708 | |
| 624 |
|
19년 전 | 2209 | |
| 623 | 19년 전 | 2187 | ||
| 622 |
|
19년 전 | 2494 | |
| 621 |
|
19년 전 | 2883 | |
| 620 |
|
19년 전 | 2389 | |
| 619 | 19년 전 | 2454 | ||
| 618 | 19년 전 | 3503 | ||
| 617 |
|
19년 전 | 3220 | |
| 616 |
|
19년 전 | 3209 | |
| 615 |
|
19년 전 | 3022 | |
| 614 |
|
19년 전 | 2031 | |
| 613 |
|
19년 전 | 2356 | |
| 612 |
|
19년 전 | 2227 | |
| 611 |
|
19년 전 | 2067 | |
| 610 |
|
19년 전 | 2503 | |
| 609 |
|
19년 전 | 2415 | |
| 608 |
|
19년 전 | 2803 | |
| 607 | 19년 전 | 2182 | ||
| 606 | 19년 전 | 3506 | ||
| 605 | 19년 전 | 1975 | ||
| 604 | 19년 전 | 2578 | ||
| 603 | 19년 전 | 1603 | ||
| 602 |
|
19년 전 | 2828 | |
| 601 | 19년 전 | 3069 | ||
| 600 |
|
19년 전 | 2152 | |
| 599 | 19년 전 | 1992 | ||
| 598 | 19년 전 | 2466 | ||
| 597 | 19년 전 | 2380 | ||
| 596 |
|
19년 전 | 3068 | |
| 595 |
|
19년 전 | 6744 | |
| 594 | 19년 전 | 2703 | ||
| 593 | 19년 전 | 3180 | ||
| 592 |
|
19년 전 | 3080 | |
| 591 |
|
19년 전 | 1920 | |
| 590 | 19년 전 | 3359 | ||
| 589 | 19년 전 | 2199 | ||
| 588 |
|
19년 전 | 2699 | |
| 587 | 19년 전 | 2340 | ||
| 586 |
|
19년 전 | 4352 | |
| 585 | 19년 전 | 2473 | ||
| 584 | 19년 전 | 2743 | ||
| 583 |
|
19년 전 | 3508 | |
| 582 |
|
19년 전 | 3709 | |
| 581 |
|
19년 전 | 3237 | |
| 580 | 19년 전 | 2471 | ||
| 579 | 19년 전 | 3050 | ||
| 578 | 19년 전 | 3938 | ||
| 577 | 19년 전 | 3790 | ||
| 576 | 19년 전 | 1729 | ||
| 575 |
|
19년 전 | 2192 | |
| 574 |
|
19년 전 | 5398 | |
| 573 | 19년 전 | 6704 | ||
| 572 | 19년 전 | 2552 | ||
| 571 | 19년 전 | 2101 | ||
| 570 | 19년 전 | 2595 | ||
| 569 | 19년 전 | 3273 | ||
| 568 | 19년 전 | 3510 | ||
| 567 | 19년 전 | 2979 | ||
| 566 | 19년 전 | 2589 | ||
| 565 |
|
19년 전 | 4706 | |
| 564 |
|
19년 전 | 6715 | |
| 563 |
|
19년 전 | 4982 | |
| 562 |
|
19년 전 | 5937 | |
| 561 |
|
19년 전 | 2675 | |
| 560 |
|
19년 전 | 2512 | |
| 559 |
|
19년 전 | 2209 | |
| 558 |
|
19년 전 | 2291 | |
| 557 | 19년 전 | 4586 | ||
| 556 |
|
19년 전 | 4651 | |
| 555 | 19년 전 | 2492 | ||
| 554 | 19년 전 | 2168 | ||
| 553 | 19년 전 | 2505 | ||
| 552 |
|
19년 전 | 3141 | |
| 551 | 19년 전 | 2927 | ||
| 550 |
|
19년 전 | 1885 | |
| 549 |
|
19년 전 | 1947 | |
| 548 |
|
19년 전 | 3135 | |
| 547 |
|
19년 전 | 2355 | |
| 546 |
|
19년 전 | 3609 | |
| 545 |
|
19년 전 | 2534 | |
| 544 |
|
19년 전 | 1843 | |
| 543 |
|
19년 전 | 2448 | |
| 542 |
|
19년 전 | 1714 | |
| 541 |
|
19년 전 | 1398 | |
| 540 |
|
19년 전 | 1524 | |
| 539 |
|
19년 전 | 1792 | |
| 538 |
|
19년 전 | 1569 | |
| 537 |
|
19년 전 | 1768 | |
| 536 |
|
19년 전 | 1554 | |
| 535 |
|
19년 전 | 1950 | |
| 534 |
|
19년 전 | 1837 | |
| 533 |
|
19년 전 | 1434 | |
| 532 |
|
19년 전 | 1433 | |
| 531 |
|
19년 전 | 1348 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기