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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1830 |
갈색야생마
|
17년 전 | 2845 | |
| 1829 |
갈색야생마
|
17년 전 | 1593 | |
| 1828 |
갈색야생마
|
17년 전 | 1352 | |
| 1827 |
갈색야생마
|
17년 전 | 2018 | |
| 1826 |
갈색야생마
|
17년 전 | 1465 | |
| 1825 |
갈색야생마
|
17년 전 | 1408 | |
| 1824 |
갈색야생마
|
17년 전 | 1354 | |
| 1823 |
갈색야생마
|
17년 전 | 1563 | |
| 1822 |
갈색야생마
|
17년 전 | 2051 | |
| 1821 |
갈색야생마
|
17년 전 | 1437 | |
| 1820 |
갈색야생마
|
17년 전 | 1408 | |
| 1819 |
갈색야생마
|
17년 전 | 1213 | |
| 1818 |
갈색야생마
|
17년 전 | 1442 | |
| 1817 |
갈색야생마
|
17년 전 | 1170 | |
| 1816 |
갈색야생마
|
17년 전 | 1301 | |
| 1815 |
갈색야생마
|
17년 전 | 1559 | |
| 1814 |
갈색야생마
|
17년 전 | 1394 | |
| 1813 |
갈색야생마
|
17년 전 | 1295 | |
| 1812 |
갈색야생마
|
17년 전 | 1262 | |
| 1811 |
갈색야생마
|
17년 전 | 1379 | |
| 1810 |
갈색야생마
|
17년 전 | 1154 | |
| 1809 |
갈색야생마
|
17년 전 | 1208 | |
| 1808 |
갈색야생마
|
17년 전 | 1241 | |
| 1807 |
갈색야생마
|
17년 전 | 1313 | |
| 1806 |
갈색야생마
|
17년 전 | 1339 | |
| 1805 |
갈색야생마
|
17년 전 | 1344 | |
| 1804 |
갈색야생마
|
17년 전 | 1307 | |
| 1803 |
갈색야생마
|
17년 전 | 1627 | |
| 1802 | 17년 전 | 2961 | ||
| 1801 | 17년 전 | 3359 | ||
| 1800 | 17년 전 | 1454 | ||
| 1799 | 17년 전 | 1550 | ||
| 1798 | 17년 전 | 1365 | ||
| 1797 | 17년 전 | 2119 | ||
| 1796 | 17년 전 | 3040 | ||
| 1795 | 17년 전 | 1380 | ||
| 1794 | 17년 전 | 1375 | ||
| 1793 |
갈색야생마
|
17년 전 | 1374 | |
| 1792 |
갈색야생마
|
17년 전 | 1223 | |
| 1791 |
갈색야생마
|
17년 전 | 1419 | |
| 1790 |
갈색야생마
|
17년 전 | 1475 | |
| 1789 |
갈색야생마
|
17년 전 | 1282 | |
| 1788 |
갈색야생마
|
17년 전 | 2566 | |
| 1787 |
갈색야생마
|
17년 전 | 1313 | |
| 1786 |
갈색야생마
|
17년 전 | 1589 | |
| 1785 |
갈색야생마
|
17년 전 | 1466 | |
| 1784 |
갈색야생마
|
17년 전 | 1772 | |
| 1783 |
갈색야생마
|
17년 전 | 1795 | |
| 1782 | 17년 전 | 1806 | ||
| 1781 | 17년 전 | 1854 | ||
| 1780 | 17년 전 | 1513 | ||
| 1779 | 17년 전 | 1605 | ||
| 1778 |
갈색야생마
|
17년 전 | 1513 | |
| 1777 |
갈색야생마
|
17년 전 | 1861 | |
| 1776 |
갈색야생마
|
17년 전 | 1771 | |
| 1775 |
갈색야생마
|
17년 전 | 1567 | |
| 1774 |
갈색야생마
|
17년 전 | 1741 | |
| 1773 |
갈색야생마
|
17년 전 | 1408 | |
| 1772 |
갈색야생마
|
17년 전 | 1640 | |
| 1771 |
갈색야생마
|
17년 전 | 1960 | |
| 1770 |
갈색야생마
|
17년 전 | 2791 | |
| 1769 | 17년 전 | 1997 | ||
| 1768 | 17년 전 | 1410 | ||
| 1767 | 17년 전 | 1952 | ||
| 1766 | 17년 전 | 2406 | ||
| 1765 | 17년 전 | 1562 | ||
| 1764 | 17년 전 | 2326 | ||
| 1763 |
sini117
|
17년 전 | 1761 | |
| 1762 |
sini117
|
17년 전 | 1469 | |
| 1761 |
nooree
|
17년 전 | 1324 | |
| 1760 | 17년 전 | 1996 | ||
| 1759 | 17년 전 | 2884 | ||
| 1758 | 17년 전 | 2503 | ||
| 1757 | 17년 전 | 1529 | ||
| 1756 | 17년 전 | 2875 | ||
| 1755 | 17년 전 | 2410 | ||
| 1754 | 17년 전 | 2754 | ||
| 1753 | 17년 전 | 2767 | ||
| 1752 | 17년 전 | 2556 | ||
| 1751 | 17년 전 | 2368 | ||
| 1750 | 17년 전 | 1728 | ||
| 1749 | 17년 전 | 2462 | ||
| 1748 | 17년 전 | 3960 | ||
| 1747 |
|
17년 전 | 1837 | |
| 1746 | 17년 전 | 3925 | ||
| 1745 | 17년 전 | 1851 | ||
| 1744 | 17년 전 | 1739 | ||
| 1743 | 17년 전 | 2070 | ||
| 1742 | 17년 전 | 2487 | ||
| 1741 | 17년 전 | 1440 | ||
| 1740 | 17년 전 | 1779 | ||
| 1739 | 17년 전 | 2335 | ||
| 1738 | 17년 전 | 1811 | ||
| 1737 | 17년 전 | 1769 | ||
| 1736 | 17년 전 | 1545 | ||
| 1735 | 17년 전 | 1389 | ||
| 1734 | 17년 전 | 1345 | ||
| 1733 | 17년 전 | 1163 | ||
| 1732 | 17년 전 | 1151 | ||
| 1731 | 17년 전 | 1178 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기