This file is indexed.

/usr/share/doc/HOWTO/ja-html/Colour-ls-6.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Colours with Linux terminals ÆüËܸìÈÇ: ¥Æ¥­¥¹¥È¥â¡¼¥É¤Î¥Ç¥Õ¥©¥ë¥Èɽ¼¨¤òÇò¹õ°Ê³°¤ËÀßÄꤹ¤ë¤Ë¤Ï</TITLE>
 <LINK HREF="Colour-ls-7.html" REL=next>
 <LINK HREF="Colour-ls-5.html" REL=previous>
 <LINK HREF="Colour-ls.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="Colour-ls-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Colour-ls-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Colour-ls.html#toc6">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s6">6. ¥Æ¥­¥¹¥È¥â¡¼¥É¤Î¥Ç¥Õ¥©¥ë¥Èɽ¼¨¤òÇò¹õ°Ê³°¤ËÀßÄꤹ¤ë¤Ë¤Ï</A></H2>

<P>
<P>»È¤¤¤¿¤¤¿·¤¿¤Ê¥Ç¥Õ¥©¥ë¥ÈÃͤòüËö¥É¥é¥¤¥Ð¤Ë¶µ¤¨¤Æ¤ä¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³
¤ì¤ò¹Ô¤¦¤¿¤á¤Îɸ½à¤ÎÊýË¡¤Ï¸ºß¤·¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢Linux ¤Ê¤é¤Ð¥×¥í¥°¥é¥à 
setterm ¤¬¤¢¤ê¤Þ¤¹¡£
<P>
<P>"setterm" ¤Ï¡¢Ã¼Ëö¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤¢¤ë¾ðÊó¤ò»È¤¤¡¢Ã¼Ëö¤Î°À­¤òÀßÄꤷ¤Þ¤¹¡£
ÁªÂò¤Ï°Ê²¼¤Î¤è¤¦¤Ë¹Ô¤¤¤Þ¤¹:
<BLOCKQUOTE><CODE>
<PRE>
setterm -foreground black -background white -store
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤³¤Ç¤Ï¡¢¼ÂºÝ¤ÎÊѹ¹¤Ë²Ã¤¨¤Æ "-store" ¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¢¤³¤ì¤ò¸½ºß
¤Î¥³¥ó¥½¡¼¥ë¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤȤ·¤Æ¤âÀßÄꤷ¤Æ¤¤¤Þ¤¹¡£
¤³¤Îµ¡Ç½¤òÍøÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¸½ºß¤ÎüËö(´Ä¶­ÊÑ¿ô TERM)¤¬ termcap ¥Ç¡¼¥¿
¥Ù¡¼¥¹¤Ë¤­¤Á¤ó¤Èµ­½Ò¤µ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£setterm ¤¬²¿¤é¤«¤ÎÍýͳ¤Ç
Æ°ºî¤·¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢Ê̤ÎÊýË¡¤â¤¢¤ê¤Þ¤¹:
<P>
<H2><A NAME="ss6.1">6.1 xterm</A>
</H2>

<P>
<P>°Ê²¼¤Î xterm ¤Î¤¤¤º¤ì¤«¤¬ÍøÍѤǤ­¤ë¤Ï¤º¤Ç¡¢¾¯¤Ê¤¯¤È¤â¤³¤ì¤é¤Î¤¤¤º¤ì¤«
¤Ï¥«¥é¡¼É½¼¨¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
xterm -fg white -bg blue4
color_xterm -fg white -bg blue4
color-xterm -fg white -bg blue4
nxterm -fg white -bg blue4
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤Î¤¦¤Á¡¢'color_xterm' ¤Ï¥«¥é¡¼Âбþ¤Î 'ls' ¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£¤³¤³
¤Ç¼¨¤·¤¿Îã¤Ç¤Ï¡¢SGI ¤ß¤¿¤¤¤Ê¥«¥é¡¼ÀßÄê¤Ë¤·¤Æ¤¤¤Þ¤¹¡£
<P>
<H2><A NAME="ss6.2">6.2 ²¾ÁÛ¥³¥ó¥½¡¼¥ë</A>
</H2>

<P>
<P>¥«¡¼¥Í¥ë¤ò¥­¥Ã¥Ñ¥ê½ñ¤­´¹¤¨¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¤·¡¢Æ±»þ¤Ë¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó
¥¹¤ò»È¤Ã¤Æ²¾ÁÛ¥³¥ó¥½¡¼¥ë¤Î¼Â¹Ô»þ¥Ç¥Õ¥©¥ë¥ÈÃͤòÍ¿¤¨¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¥«¡¼
¥Í¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤¿¤³¤È¤¬¤¢¤ëÊý¤Ë¤Ï¡¢¥«¡¼¥Í¥ë¥Ñ¥Ã¥Á¤ò¤ª´«¤á¤·¤Þ¤¹¡£
<P>¥«¡¼¥Í¥ë¥½¡¼¥¹¤Î¥Õ¥¡¥¤¥ë¤Ï /usr/src/linux/drivers/char/console.c ¤Ç¤¹¡£
¤³¤Î¥Õ¥¡¥¤¥ë¤Î 1940 ¹ÔÌܤ¢¤¿¤ê¤Ë¡¢
<P>
<BLOCKQUOTE><CODE>
<PRE>
        def_color       = 0x07;   /* white */
        ulcolor         = 0x0f;   /* bold white */
        halfcolor       = 0x08;   /* grey */
</PRE>
</CODE></BLOCKQUOTE>

¤È¤¢¤ë¤Î¤Ç¡¢¤³¤ì¤òŬÅö¤ËÊѹ¹¤¹¤ë¤ï¤±¤Ç¤¹¡£»ä¤Ï¡¢
<BLOCKQUOTE><CODE>
<PRE>
        def_color       = 0x17;   /* white */
        ulcolor         = 0x1f;   /* bold white */
        halfcolor       = 0x18;   /* grey */
</PRE>
</CODE></BLOCKQUOTE>
<P>¤È¤·¤Æ¡¢ÀÄÃϤËÇòʸ»ú¤ÎÀßÄê¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¡£
<P>¾åµ­¤Î¿ô»ú(16¿Ê¿ô)¤Ï¥Ó¥Ç¥ª¥«¡¼¥É¤¬»È¤¦Â°À­¥³¡¼¥É¤Ç¤¹¡£¾å¤Î¥±¥¿¤Î¿ô»ú
(»ä¤ÎÀßÄê¤Ç¤Ï 1)¤ÏÇØ·Ê¿§¡¢²¼¤Î¥±¥¿¤Î¿ô»ú¤ÏÁ°·Ê¿§(ʸ»ú¿§)¤Ç¤¹¡£0=¹õ, 1=
ÀÄ, 2=ÎÐ, 3=¥·¥¢¥ó, 4=ÀÖ, 5=»ç, 6=Ã㿧/²«¿§, 7=Çò¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¡ÖÌÀ
¤ë¤¤¡×¿§¤ò»È¤¦¾ì¹ç¤Ï¿ô»ú¤Ë 8 ¤ò²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡£¤¿¤¤¤Æ¤¤¤Î¾ì¹ç¤Ï ¹âµ±ÅÙ
¤ÎÇØ·Ê == ʸ»ú¤¬¸«¤Ë¤¯¤¤ ¤Ê¤Î¤Ç¡¢Îɤ¯¤Ê¤¤ÇطʤȤ¤¤¦¤³¤È¤Ç¤¹
(
<A HREF="mailto:sjlam1@mda023.cc.monash.edu.au">sjlam1@mda023.cc.monash.edu.au</A> ¤µ¤ó¤è¤ê)¡£¤´Ãí°Õ¤ò¡£
<P>
<P>
<P>ɸ½à¤Ç¤Ê¤¤¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹(¥«¡¼¥Í¥ë¥½¡¼¥¹¤òį¤á¤Æ¤¤¤Æȯ¸«¤·¤Þ¤·¤¿)
¤ò»È¤Ã¤Æ¡¢¥Ç¥£¥¹¥×¥ì¥¤¤´¤È¤Ë²¾ÁÛ¥³¥ó¥½¡¼¥ë¤ËÂФ¹¤ë¼Â¹Ô»þ¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ
¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥·¡¼¥±¥ó¥¹¤Ï
<BLOCKQUOTE><CODE>
<PRE>
        ESC [ 8 ]
</PRE>
</CODE></BLOCKQUOTE>
<P>¤Ç¤¢¤ê¡¢¸½ºß¤ÎÁ°·Ê¿§¤ÈÇØ·Ê¿§¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤòÀßÄꤷ¤Þ¤¹¡£¤½¤ì¤«¤é°À­ºÆ
ÀßÄêʸ»úÎó(ESC [ m)¤ò»È¤Ã¤ÆÇò¡¦¹õ°Ê³°¤Î¿§¤òÁªÂò¤·¤Þ¤¹¡£
<P>¼ÂºÝ¤Ë¤Ï¥Þ¥·¥ó¤òºÆµ¯Æ°¤¹¤ëÅ٤ˡ¢¤³¤Î¥·¡¼¥±¥ó¥¹¤ò¥³¥ó¥½¡¼¥ë¤Ë echo ¤¹¤ë
ɬÍפ¬¤¢¤ê¤Þ¤¹¡£Linux ¥Þ¥·¥ó¤ò¤É¤Î¤è¤¦¤Ë»È¤Ã¤Æ¤¤¤ë¤«¤Ë¤è¤ê¡¢¤¤¤í¤¤¤í¤È
¤ä¤êÊý¤¬¤¢¤ê¤Þ¤¹:
<P>
<H3>/etc/issue</H3>

<P>
<P>Slackware ¤¬ "Welcome to Linux xx.yy" ¤Îɽ¼¨¤ò¹Ô¤¦Éôʬ¤Ç¤¹¡£¥¹¥¿¥ó¥É¥¢
¥í¡¼¥ó¤Î¥Þ¥·¥ó¤Ê¤é¡¢¤³¤³¤Ç echo ¤ò¤¹¤ë¤Î¤âÎɤ¤¤Ç¤·¤ç¤¦(telnet ¤Ç 
login ¤¹¤ë¥æ¡¼¥¶¡¼¤Ë¤ÏÍ­³²¤«¤â¤·¤ì¤Þ¤»¤ó¤¬)¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¥Ö¡¼¥È»þ¤Ë
¼«Æ°Åª¤ËÀ¸À®¤µ¤ì¤ë(Slackware ¤Ê¤é /etc/rc.d/rc.S ¤Ç¡¢RedHat ¤Ê¤é 
/etc/rc.d/rc.local)¥Õ¥¡¥¤¥ë¤Ç¡¢°Ê²¼¤Î¤è¤¦¤ÊÉôʬ¤ò
<P>
<BLOCKQUOTE><CODE>
<PRE>
  echo ""> /etc/issue
  echo Welcome to Linux `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue
</PRE>
</CODE></BLOCKQUOTE>

¤«¤é
<BLOCKQUOTE><CODE>
<PRE>
  ESCAPE="&lt;replace with a single escape character here>"
  echo "${ESCAPE}[H${ESCAPE}[37;44m${ESCAPE}[8]${ESCAPE}[2J"> /etc/issue
  echo Welcome to Linux `/bin/uname -a | /bin/cut -d\  -f3`. >> /etc/issue
</PRE>
</CODE></BLOCKQUOTE>
<P>¤ËÊѹ¹¤·¤Þ¤·¤ç¤¦¡£
<P>¤³¤ÎÌ¿Îá¤Ï¡¢¥«¡¼¥½¥ë¤ò¥Û¡¼¥à¥Ý¥¸¥·¥ç¥ó¤ËÃÖ¤­¡¢¥«¥é¡¼(ÀÄÃϤËÇòʸ»ú)¤òÀß
Äꤷ¤Æ¥»¡¼¥Ö¤·¡¢¥¹¥¯¥ê¡¼¥ó¤Î»Ä¤ê¤ÎÉôʬ¤ò¥¯¥ê¥¢¤·¤Þ¤¹¡£¤³¤ÎÊѹ¹¤Ï¡¢ºÆµ¯
Æ°¸å¤ËÍ­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥¹¥¯¥ê¥×¥È¤ò¼Â¹Ô¤¹¤ë sh ¤Ï¡¢\033 ¤È¤¤¤¦½ñ¤­
Êý¤ò½èÍý¤Ç¤­¤Ê¤¤¤è¤¦¤Ê¤Î¤Ç¡¢¼ÂºÝ¤Î¥¨¥¹¥±¡¼¥×¥­¥ã¥é¥¯¥¿¡¼¤òÁÞÆþ¤¹¤ë¤Î¤ò
˺¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£emacs ¤Ê¤é C-q¡¢vi ¤Ê¤é C-v ¤ÇÆþÎϤǤ­¤Þ¤¹¡£
<P>
<H3>/etc/profile ¤Þ¤¿¤Ï .profile</H3>

<P>
<BLOCKQUOTE><CODE>
<PRE>
  if [ "$TERM" = "console" ]; then
      echo "\033[37;44m\033[8]" #
# or use setterm.
      setterm -foreground white -background blue -store
  fi
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H3>/etc/login ¤Þ¤¿¤Ï .login</H3>

<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
  if ( "$TERM" == "console" ) then
    echo "\033[37;44m\033[8]"  
# or use setterm.
      setterm -foreground white -background blue -store
  endif
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss6.3">6.3 ¥ê¥â¡¼¥È¥í¥°¥¤¥ó</A>
</H2>

<P>
<P>Àè¤Ë¼¨¤·¤¿¤è¤¦¤Ë setterm ¤¬»È¤¨¤ë¤Ï¤º¤Ç¤¹¡£·«¤êÊÖ¤·¤Þ¤¹¤¬¡¢¤¢¤Ê¤¿¤¬»È
¤Ã¤Æ¤¤¤ëüËö¤Î¤³¤È¤ò¡¢¥í¥°¥¤¥óÀè¤Î¥Þ¥·¥ó¤¬½½Ê¬¤ËÃΤäƤ¤¤ëɬÍפ¬¤¢¤ê¤Þ
¤¹¡£¤Þ¤¿¡¢¥í¥°¥¤¥ó¤Ë»È¤¦Ã¼Ëö¥¨¥ß¥å¥ì¡¼¥¿¤â¡¢¥«¥é¡¼µ¡Ç½¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤
¤ë¤³¤È¤¬É¬ÍפǤ¹¡£É®¼Ô¤Î·Ð¸³¤ò´ð¤Ë¡¢Linux °Ê³°¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¸½ºß
¤Î¤È¤³¤í¤â¤Ã¤È¤â¤¦¤Þ¤¯ VT100 ¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¬¤Ç¤­¤Æ¤¤¤ë¤â¤Î¤ò¼¨¤·¤Þ
¤¹:
<UL>
<LI>MS-DOS:         MS-Kermit (¥Õ¥ê¡¼¡¢Microsoft À½ÉʤǤϤ¢¤ê¤Þ¤»¤ó)</LI>
<LI>Windows 95/NT:  Kermit/95 (¥·¥§¥¢¥¦¥§¥¢)</LI>
<LI>OS/2:           Kermit/95 (¥·¥§¥¢¥¦¥§¥¢)¡£¤¿¤À¤·¡¢É¸½à¤Î telnet 
¤Ï¿§¤ò»È¤¦¤³¤È¤¬¤Ç¤­¡¢¥í¡¼¥«¥ë¤Ç¥«¥¹¥¿¥Þ¥¤¥º¤Ç¤­¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£</LI>
</UL>
<P>Kermit ¤Î¾Ü¤·¤¤¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢
<A HREF="http://www.columbia.edu/kermit/">http://www.columbia.edu/kermit/</A>
¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
<P>
<P>
<HR>
<A HREF="Colour-ls-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Colour-ls-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Colour-ls.html#toc6">Ìܼ¡¤Ø</A>
</BODY>
</HTML>