OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / file / draft / man4 / magic.4
index 43dc49b..996430d 100644 (file)
 .\"
 .\" install as magic.4 on USG, magic.5 on V7 or Berkeley systems.
 .\"O .SH NAME
-.SH Ì¾Á°
+.SH 名前
 .\"O magic \- file command's magic number file
-magic \- file ¥³¥Þ¥ó¥ÉÍѤΥޥ¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¥Õ¥¡¥¤¥ë
+magic \- file コマンド用のマジックナンバーファイル
 .\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O This manual page documents the format of the magic file as
 .\"O used by the
 .\"O .BR file (1)
 .\"O command, version 4.12.
-¤³¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç¤Ï¡¢
+このマニュアルページでは、
 .BR file (1)
-¥³¥Þ¥ó¥É (¥Ð¡¼¥¸¥ç¥ó 4.12) ¤¬»ÈÍѤ¹¤ë magic ¥Õ¥¡¥¤¥ë¤Î½ñ¼°¤òÀâÌÀ¤¹¤ë¡£
+コマンド (バージョン 4.12) が使用する magic ファイルの書式を説明する。
 .\"O The
 .\"O .BR file
 .\"O command identifies the type of a file using,
 .\"O among other tests,
 .\"O a test for whether the file begins with a certain
 .\"O .IR "magic number" .
-¥Õ¥¡¥¤¥ë¤Î¼ïÎà¤òÄ´¤Ù¤ëÊýË¡¤Ï¿§¡¹¤¢¤ë¤¬¡¢
+ファイルの種類を調べる方法は色々あるが、
 .B file
-¥³¥Þ¥ó¥É¤Ï¥Õ¥¡¥¤¥ë¤¬ÆÃÄê¤Î
-\fI¡Ö¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼ (magic number)¡×\fR
-¤Ç»Ï¤Þ¤ë¤«¤É¤¦¤«¤Ë¤è¤Ã¤Æ¥Õ¥¡¥¤¥ë¤Î¼ïÎà¤ò¼±Ê̤¹¤ë¡£
+コマンドはファイルが特定の
+\fI「マジックナンバー (magic number)」\fR
+で始まるかどうかによってファイルの種類を識別する。
 .\"O The file
 .\"O .I /usr/share/file/magic
 .\"O specifies what magic numbers are to be tested for,
 .\"O what message to print if a particular magic number is found,
 .\"O and additional information to extract from the file.
-¥Õ¥¡¥¤¥ë
+ファイル
 .I /usr/share/file/magic
-¤Ç»ØÄꤹ¤ë¤³¤È¤Ï¡¢Ä´¤Ù¤ë¤Ù¤­¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¡¢
-ÆÃÄê¤Î¥Þ¥¸¥Ã¥¯¥Ê¥ó¥Ð¡¼¤¬¸«¤Ä¤«¤Ã¤¿»þ¤Ëɽ¼¨¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¢
-¥Õ¥¡¥¤¥ë¤«¤é¼è¤ê½Ð¤»¤ë¤½¤Î¾¤Î¾ðÊó¤Ç¤¢¤ë¡£
+で指定することは、調べるべきマジックナンバー、
+特定のマジックナンバーが見つかった時に表示するメッセージ、
+ファイルから取り出せるその他の情報である。
 .PP
 .\"O Each line of the file specifies a test to be performed.
-magic ¥Õ¥¡¥¤¥ë¤Î³Æ¹Ô¤Ç¤Ï¼Â¹Ô¤¹¤ë¥Æ¥¹¥È¤ò»ØÄꤹ¤ë¡£
+magic ファイルの各行では実行するテストを指定する。
 .\"O A test compares the data starting at a particular offset
 .\"O in the file with a 1-byte, 2-byte, or 4-byte numeric value or
 .\"O a string.
 .\"O If the test succeeds, a message is printed.
-¥Æ¥¹¥È¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ëÀèƬ¤«¤é¸«¤ÆÆÃÄê¤Î¥ª¥Õ¥»¥Ã¥È°ÌÃ֤ˤ¢¤ë¥Ç¡¼¥¿¤È¡¢
-1 ¥Ð¥¤¥È¤Þ¤¿¤Ï 2 ¥Ð¥¤¥È¡¢4 ¥Ð¥¤¥È¤Î¿ôÃͤäʸ»úÎó¤È¤ÎÈæ³Ó¤¬¹Ô¤ï¤ì¤ë¡£
-¥Æ¥¹¥È¤¬À®¸ù¤¹¤ë¤È»ØÄꤷ¤¿¥á¥Ã¥»¡¼¥¸¤¬½ÐÎϤµ¤ì¤ë¡£
+テストでは、ファイル先頭から見て特定のオフセット位置にあるデータと、
+1 バイトまたは 2 バイト、4 バイトの数値や文字列との比較が行われる。
+テストが成功すると指定したメッセージが出力される。
 .\"O The line consists of the following fields:
-¹Ô¤Ë¤Ï°Ê²¼¤Î¹àÌܤ¬´Þ¤Þ¤ì¤ë:
+行には以下の項目が含まれる:
 .IP offset \w'message'u+2n
 .\"O A number specifying the offset, in bytes, into the file of the data
 .\"O which is to be tested.
-Ä´¤Ù¤ë¥Ç¡¼¥¿¤Î¥Õ¥¡¥¤¥ëÆâ¤Ç¤Î°ÌÃÖ¤ò»ØÄꤹ¤ë¥ª¥Õ¥»¥Ã¥ÈÃͤǡ¢Ã±°Ì¤Ï¥Ð¥¤¥È¤Ç¤¢¤ë¡£
+調べるデータのファイル内での位置を指定するオフセット値で、単位はバイトである。
 .IP type
 .\"O The type of the data to be tested.
 .\"O The possible values are:
-Ä´¤Ù¤ë¥Ç¡¼¥¿¤Î·¿¡£»ØÄê¤Ç¤­¤ëÃͤϰʲ¼¤ÎÄ̤ê¤Ç¤¢¤ë:
+調べるデータの型。指定できる値は以下の通りである:
 .RS
 .IP byte \w'message'u+2n
 .\"O A one-byte value.
-1 ¥Ð¥¤¥ÈÃÍ¡£
+1 バイト値。
 .IP short
 .\"O A two-byte value (on most systems) in this machine's native byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 2 ¥Ð¥¤¥ÈÃÍ¡£¥Þ¥·¥ó¤Î¥Í¥¤¥Æ¥£¥Ö¤Î¥Ð¥¤¥È½ç¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 2 バイト値。マシンのネイティブのバイト順である。
 .IP long
 .\"O A four-byte value (on most systems) in this machine's native byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Þ¥·¥ó¤Î¥Í¥¤¥Æ¥£¥Ö¤Î¥Ð¥¤¥È½ç¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。マシンのネイティブのバイト順である。
 .IP string
 .\"O A string of bytes.
-ʸ»úÎó¤òɽ¤¹¥Ð¥¤¥ÈÎó¡£
+文字列を表すバイト列。
 .\"O The string type specification can be optionally followed
 .\"O by /[Bbc]*.
-string ·¿¤Î»ØÄê¤Ç¤Ï¡¢¥ª¥×¥·¥ç¥ó¤È¤·¤Æ /[Bbc]* ¤ò¸å¤í¤Ë³¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+string 型の指定では、オプションとして /[Bbc]* を後ろに続けることができる。
 .\"O The ``B'' flag compacts whitespace in the target, which must
 .\"O contain at least one whitespace character.
-``B'' ¥Õ¥é¥°¤Ï¡¢Âоݥե¡¥¤¥ëÃæ¤ÎÊ£¿ô¸Ä¤Î¶õÇò¤ò 1 ¸Ä¤Î¶õÇò¤ËÀÚ¤êµÍ¤á¤Æ°·¤¦¡£
-¤³¤Î¾ì¹ç¡¢Âоݥե¡¥¤¥ë¤Ï¾¯¤Ê¤¯¤È¤â 1 ¸Ä¤Î¶õÇò¤ò´Þ¤ó¤Ç¤¤¤ëɬÍפ¬¤¢¤ë¡£
+``B'' フラグは、対象ファイル中の複数個の空白を 1 個の空白に切り詰めて扱う。
+この場合、対象ファイルは少なくとも 1 個の空白を含んでいる必要がある。
 .\"O If the magic has
 .\"O .I n
 .\"O consecutive blanks, the target needs at least
 .\"O .I n
 .\"O consecutive blanks to match.
-magic ¥Õ¥¡¥¤¥ë¤Ë
+magic ファイルに
 .I n
-¸Ä¤ÎϢ³¤·¤¿¶õÇò¤¬¤¢¤ë¾ì¹ç¡¢
-Âоݥե¡¥¤¥ë¤Ë¤Ï¡¢¤³¤ì¤Ë¥Þ¥Ã¥Á¤¹¤ë
+個の連続した空白がある場合、
+対象ファイルには、これにマッチする
 .I n
-¸Ä¤ÎϢ³¤·¤¿¶õÇò¤¬É¬ÍפȤʤ롣
+個の連続した空白が必要となる。
 .\"O The ``b'' flag treats every blank in the target as an optional blank.
-``b''¥Õ¥é¥°¤Ï¡¢Âоݥե¡¥¤¥ëÃæ¤Î¶õÇò¤ò
-¸ºß¤·¤Æ¤â¤·¤Ê¤¯¤Æ¤â¤è¤¤¶õÇò¤È¤·¤Æ°·¤¦¡£
+``b''フラグは、対象ファイル中の空白を
+存在してもしなくてもよい空白として扱う。
 .\"O Finally the ``c'' flag, specifies case insensitive matching: lowercase
 .\"O characters in the magic match both lower and upper case characters in the
 .\"O targer, whereas upper case characters in the magic, only much uppercase
 .\"O characters in the target.
-¤µ¤é¤Ë¡¢``c'' ¥Õ¥é¥°¤Ï¡¢Âçʸ»ú¡¦¾®Ê¸»ú¤ò¶èÊ̤·¤Ê¤¤¥Þ¥Ã¥Á¤ò¹Ô¤¦¤³¤È¤ò»ØÄꤹ¤ë:
-magic ¥Õ¥¡¥¤¥ëÃæ¤Î¾®Ê¸»ú¤Ï¡¢
-Âоݥե¡¥¤¥ëÃæ¤ÎÂçʸ»ú¡¦¾®Ê¸»ú¤ÎξÊý¤Ë¥Þ¥Ã¥Á¤¹¤ë¡£
-¤·¤«¤·¡¢magic ¥Õ¥¡¥¤¥ëÃæ¤ÎÂçʸ»ú¤Ï¡¢
-Âоݥե¡¥¤¥ëÃæ¤ÎÂçʸ»ú¤Ë¤Î¤ß¥Þ¥Ã¥Á¤¹¤ë¡£
+さらに、``c'' フラグは、大文字・小文字を区別しないマッチを行うことを指定する:
+magic ファイル中の小文字は、
+対象ファイル中の大文字・小文字の両方にマッチする。
+しかし、magic ファイル中の大文字は、
+対象ファイル中の大文字にのみマッチする。
 .IP date
 .\"O A four-byte value interpreted as a UNIX date.
-UNIX »þ¹ï¤È²ò¼á¤µ¤ì¤ë 4 ¥Ð¥¤¥ÈÃÍ¡£
+UNIX 時刻と解釈される 4 バイト値。
 .IP ldate
 .\"O A four-byte value interpreted as a UNIX-style date, but interpreted as
 .\"O local time rather than UTC.
-UNIX ·Á¼°¤Î»þ¹ï¤È²ò¼á¤µ¤ì¤ë 4 ¥Ð¥¤¥ÈÃÍ¡£
-¤¿¤À¤· UTC ¤Ç¤Ï¤Ê¤¯¥í¡¼¥«¥ë¥¿¥¤¥à¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
+UNIX 形式の時刻と解釈される 4 バイト値。
+ただし UTC ではなくローカルタイムとして解釈される。
 .IP beshort
 .\"O A two-byte value (on most systems) in big-endian byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 2 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 2 バイト値。バイト順はビッグエンディアンである。
 .IP belong
 .\"O A four-byte value (on most systems) in big-endian byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。バイト順はビッグエンディアンである。
 .IP bedate
 .\"O A four-byte value (on most systems) in big-endian byte order,
 .\"O interpreted as a Unix date.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
-UNIX »þ¹ï¤È²ò¼á¤µ¤ì¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。バイト順はビッグエンディアンである。
+UNIX 時刻と解釈される。
 .IP leshort
 .\"O A two-byte value (on most systems) in little-endian byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 2 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 2 バイト値。バイト順はリトルエンディアンである。
 .IP lelong
 .\"O A four-byte value (on most systems) in little-endian byte order.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。バイト順はリトルエンディアンである。
 .IP ledate
 .\"O A four-byte value (on most systems) in little-endian byte order,
 .\"O interpreted as a UNIX date.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
-UNIX »þ¹ï¤È²ò¼á¤µ¤ì¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。バイト順はリトルエンディアンである。
+UNIX 時刻と解釈される。
 .IP leldate
 .\"O A four-byte value (on most systems) in little-endian byte order,
 .\"O interpreted as a UNIX-style date, but interpreted as local time rather
 .\"O than UTC.
-(¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ç¤Ï) 4 ¥Ð¥¤¥ÈÃÍ¡£¥Ð¥¤¥È½ç¤Ï¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Ç¤¢¤ë¡£
-UNIX ·Á¼°¤Î»þ¹ï¤È²ò¼á¤µ¤ì¤ë¡£
-¤¿¤À¤· UTC ¤Ç¤Ï¤Ê¤¯¥í¡¼¥«¥ë¥¿¥¤¥à¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
+(ほとんどのシステムでは) 4 バイト値。バイト順はリトルエンディアンである。
+UNIX 形式の時刻と解釈される。
+ただし UTC ではなくローカルタイムとして解釈される。
 .RE
 .PP
 .\"O The numeric types may optionally be followed by
@@ -152,62 +152,62 @@ UNIX 
 .\"O Prepending a
 .\"O .B u
 .\"O to the type indicates that ordered comparisons should be unsigned.
-¿ôÃÍ·¿¤ÎÃͤθå¤Ë¤Ï
+数値型の値の後には
 .B &
-¤È¿ôÃͤò½ñ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£¤³¤Î¾ì¹ç¡¢Èæ³Ó¤ò¹Ô¤¦Á°¤Ë
+と数値を書くことができる。この場合、比較を行う前に
 .B &
-¤Î¸å¤ËÃÖ¤¤¤¿¿ôÃͤȤΠAND ±é»»¤¬¹Ô¤ï¤ì¤ë¡£·¿¤ÎÁ°¤Ë
+の後に置いた数値との AND 演算が行われる。型の前に
 .B u
-¤òÃÖ¤¯¤³¤È¤Ç¡¢½ç½øÉÕ¤­¤ÎÈæ³Ó¤òÉä¹æ̵¤·¤Ç¹Ô¤¦¤³¤È¤¬»ØÄê¤Ç¤­¤ë¡£
+を置くことで、順序付きの比較を符号無しで行うことが指定できる。
 .IP test
 .\"O The value to be compared with the value from the file.
 .\"O If the type is
 .\"O numeric, this value
 .\"O is specified in C form; if it is a string, it is specified as a C string
 .\"O with the usual escapes permitted (e.g. \en for new-line).
-¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤÈÈæ³Ó¤¹¤ëÃÍ¡£
-¤³¤ì¤Ï C ¸À¸ì¤Îʸ»úÎó¤È¤·¤Æ»ØÄꤷ¡¢¥¨¥¹¥±¡¼¥×ʸ»ú¤âÉáÄ̤˻Ȥ¨¤ë
-(Îã: \en ¤Ï²þ¹Ôʸ»ú)¡£
+ファイル内の値と比較する値。
+これは C 言語の文字列として指定し、エスケープ文字も普通に使える
+(例: \en は改行文字)。
 .IP
 .\"O Numeric values
 .\"O may be preceded by a character indicating the operation to be performed.
-¿ôÃÍ
-¤ÎÁ°¤Ë¤Ï¡¢¼Â¹Ô¤¹¤ëÆ°ºî¤ò»ØÄꤹ¤ëʸ»ú¤òÃÖ¤¯¤³¤È¤¬¤Ç¤­¤ë¡£
+数値
+の前には、実行する動作を指定する文字を置くことができる。
 .\"O It may be
 .\"O .BR = ,
 .\"O to specify that the value from the file must equal the specified value,
 .BR =
-¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤϻØÄꤷ¤¿ÃͤÈÅù¤·¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+を指定した場合は、ファイル内の値は指定した値と等しくなければならない。
 .\"O .BR < ,
 .\"O to specify that the value from the file must be less than the specified
 .\"O value,
 .BR <
-¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤϻØÄꤷ¤¿Ãͤè¤ê¾®¤µ¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+を指定した場合は、ファイル内の値は指定した値より小さくなければならない。
 .\"O .BR > ,
 .\"O to specify that the value from the file must be greater than the specified
 .\"O value,
 .BR >
-¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤϻØÄꤷ¤¿Ãͤè¤êÂ礭¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+を指定した場合は、ファイル内の値は指定した値より大きくなければならない。
 .\"O .BR & ,
 .\"O to specify that the value from the file must have set all of the bits 
 .\"O that are set in the specified value,
 .BR &
-¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢»ØÄꤷ¤¿ÃͤÇΩ¤Ã¤Æ¤¤¤ëÁ´¤Æ¤Î¥Ó¥Ã¥È¤¬¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤǤâ
-Ω¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+を指定した場合は、指定した値で立っている全てのビットがファイル内の値でも
+立っていなければならない。
 .\"O .BR ^ ,
 .\"O to specify that the value from the file must have clear any of the bits 
 .\"O that are set in the specified value, or
 .BR ^
-¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢»ØÄꤷ¤¿ÃͤÇΩ¤Ã¤Æ¤¤¤ë¤É¤Î¥Ó¥Ã¥È¤â¡¢
-¥Õ¥¡¥¤¥ëÆâ¤ÎÃͤÇΩ¤Ã¤Æ¤¤¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+を指定した場合は、指定した値で立っているどのビットも、
+ファイル内の値で立っていてはならない。
 .\"O .BR x ,
 .\"O to specify that any value will match.
 .BR x
-¤Ï¤É¤ó¤ÊÃͤˤâ¥Þ¥Ã¥Á¤¹¤ë¡£Ê¸»ú¤¬¾Êά¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
+はどんな値にもマッチする。文字が省略されている場合は、
 .\"O If the character is omitted, it is assumed to be
 .\"O .BR = .
 .BR =
-¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤È¤ß¤Ê¤µ¤ì¤ë¡£
+が指定されているとみなされる。
 .IP
 .\"O Numeric values are specified in C form; e.g.
 .\"O .B 13
@@ -216,18 +216,18 @@ UNIX 
 .\"O is octal, and
 .\"O .B 0x13
 .\"O is hexadecimal.
-¿ôÃͤϠC ¸À¸ì¤Î½ñ¼°¤Ç»ØÄꤹ¤ë¡£Î㤨¤Ð¡¢
+数値は C 言語の書式で指定する。例えば、
 .B 13
-¤Ï 10 ¿Ê¿ô¡¢
+は 10 進数、
 .B 013
-¤Ï 8 ¿Ê¿ô¡¢
+は 8 進数、
 .B 0x13
-¤Ï 16 ¿Ê¿ô¤Ç¤¢¤ë¡£
+は 16 進数である。
 .IP
 .\"O For string values, the byte string from the
 .\"O file must match the specified byte string. 
-ʸ»úÎó¤Î¾ì¹ç¡¢¥Õ¥¡¥¤¥ëÃæ¤Ë´Þ¤Þ¤ì¤ë¥Ð¥¤¥Èʸ»úÎó¤Ï¡¢»ØÄꤵ¤ì¤¿
-¥Ð¥¤¥Èʸ»úÎó¤Ë¥Þ¥Ã¥Á¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+文字列の場合、ファイル中に含まれるバイト文字列は、指定された
+バイト文字列にマッチしなければならない。
 .\"O The operators
 .\"O .BR = ,
 .\"O .B <
@@ -236,103 +236,103 @@ UNIX 
 .\"O (but not
 .\"O .BR & )
 .\"O can be applied to strings.
-±é»»»Ò
+演算子
 .BR = ,
 .BR < ,
 .B >
-¤Ïʸ»úÎó¤Ë¤âŬÍѤǤ­¤ë (¤¿¤À¤·
+は文字列にも適用できる (ただし
 .B &
-¤ÏŬÍѤǤ­¤Ê¤¤)¡£
+は適用できない)。
 .\"O The length used for matching is that of the string argument
 .\"O in the magic file.
 .\"O This means that a line can match any string, and
 .\"O then presumably print that string, by doing
 .\"O .B >\e0
 .\"O (because all strings are greater than the null string).
-¥Þ¥Ã¥Á¥ó¥°¤ò¹Ô¤¦Ä¹¤µ¤Ï¡¢magic ¥Õ¥¡¥¤¥ë¤Îʸ»úÎó°ú¿ô¤ÎŤµ¤Ç¤¢¤ë¡£
-¤Ä¤Þ¤ê¡¢
+マッチングを行う長さは、magic ファイルの文字列引数の長さである。
+つまり、
 .B >\e0
-¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤ê¡¢¤¢¤ë¹Ô¤ò¤É¤ó¤Êʸ»úÎó¤Ë¤â¥Þ¥Ã¥Á¤µ¤»¡¢¤½¤·¤Æ¿ʬ
-¤½¤Îʸ»úÎó¤òɽ¼¨¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¤À¤í¤¦¡£
+を指定することにより、ある行をどんな文字列にもマッチさせ、そして多分
+その文字列を表示させることができるだろう。
 .IP message
 .\"O The message to be printed if the comparison succeeds.  If the string
 .\"O contains a
 .\"O .BR printf (3)
 .\"O format specification, the value from the file (with any specified masking
 .\"O performed) is printed using the message as the format string.
-Èæ³Ó¤¬À®¸ù¤·¤¿¤È¤­¤Ë½ÐÎϤµ¤ì¤ë¥á¥Ã¥»¡¼¥¸¡£
-ʸ»úÎó¤Ë
+比較が成功したときに出力されるメッセージ。
+文字列に
 .BR printf (3)
-¤Î½ñ¼°»ØÄ꤬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤Î¥á¥Ã¥»¡¼¥¸¤ò½ñ¼°»ØÄêʸ»úÎó¤È¤·¤Æ»È¤Ã¤Æ
-¥Õ¥¡¥¤¥ëÆâ¤ÎÃÍ (»ØÄꤵ¤ì¤¿Á´¤Æ¤Î¥Þ¥¹¥¯½èÍý¤Ï¼Â¹Ô¤µ¤ì¤ë) ¤¬½ÐÎϤµ¤ì¤ë¡£
+の書式指定が含まれている場合、このメッセージを書式指定文字列として使って
+ファイル内の値 (指定された全てのマスク処理は実行される) が出力される。
 .PP
 .\"O Some file formats contain additional information which is to be printed
 .\"O along with the file type.
-°ìÉô¤Î¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤Î¼ïÎà¤È¤È¤â¤ËÄɲþðÊó¤¬É½¼¨¤µ¤ì¤ë¡£
+一部のファイルフォーマットでは、ファイルの種類とともに追加情報が表示される。
 .\"O A line which begins with the character
 .\"O .B >
 .\"O indicates additional tests and messages to be printed.
-ʸ»ú
+文字
 .B >
-¤Ç»Ï¤Þ¤ë¹Ô¤Ï¡¢ÄɲäǹԤ¦¥Æ¥¹¥È¤Èɽ¼¨¥á¥Ã¥»¡¼¥¸¤ò¼¨¤¹¡£
+で始まる行は、追加で行うテストと表示メッセージを示す。
 .\"O The number of
 .\"O .B >
 .\"O on the line indicates the level of the test; a line with no
 .\"O .B >
 .\"O at the beginning is considered to be at level 0.
-1 ¹Ô¤Ë´Þ¤Þ¤ì¤ë
+1 行に含まれる
 .B >
-¤Î¿ô¤Ï¥Æ¥¹¥È¤Î¥ì¥Ù¥ë¤òɽ¤¹¡£
-ÀèƬ¤Ë
+の数はテストのレベルを表す。
+先頭に
 .B >
-¤¬¤Ê¤¤¹Ô¤Ï¥ì¥Ù¥ë 0 ¤Ë¤Ê¤ë¡£
+がない行はレベル 0 になる。
 .\"O Each line at level
 .\"O .IB n \(pl1
 .\"O is under the control of the line at level
 .\"O .IB n
 .\"O most closely preceding it in the magic file.
-¥ì¥Ù¥ë
+レベル
 .IB n \(pl1
-¤Î³Æ¹Ô¤Ï¡¢magic ¥Õ¥¡¥¤¥ëÃæ¤Ç¼«Ê¬¤è¤êÁ°¤Ë¤¢¤ë¥ì¥Ù¥ë
+の各行は、magic ファイル中で自分より前にあるレベル
 .IB n
-¤Î¹Ô¤Î¤¦¤Á¡¢ºÇ¤â¶á¤¤°ÌÃ֤Τâ¤Î¤ÎÀ©¸æ¤Ë½¾¤¦¡£
+の行のうち、最も近い位置のものの制御に従う。
 .\"O If the test on a line at level
 .\"O .I n
 .\"O succeeds, the tests specified in all the subsequent lines at level
 .\"O .IB n \(pl1
 .\"O are performed, and the messages printed if the tests succeed.
-¥ì¥Ù¥ë
+レベル
 .I n
-¤Î¹Ô¤Î¥Æ¥¹¥È¤¬À®¸ù¤¹¤ë¤È¡¢¤½¤ì¤Ë³¤¯Á´¤Æ¤Î¥ì¥Ù¥ë
+の行のテストが成功すると、それに続く全てのレベル
 .IB n \(pl1
-¤Î¹Ô¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¥Æ¥¹¥È¤¬¼Â¹Ô¤µ¤ì¡¢
-¤½¤Î¥Æ¥¹¥È¤¬À®¸ù¤¹¤ë¤È¥á¥Ã¥»¡¼¥¸¤¬½ÐÎϤµ¤ì¤ë¡£
+の行で指定されているテストが実行され、
+そのテストが成功するとメッセージが出力される。
 .\"O The next line at level
 .\"O .I n
 .\"O terminates this.
-¼¡¤Ë
+次に
 .I n
-¤¬¤¢¤Ã¤¿¾ì½ê¤Ç¤³¤ÎÆ°ºî¤Ï½ªÎ»¤¹¤ë¡£
+があった場所でこの動作は終了する。
 .\"O If the first character following the last
 .\"O .B >
 .\"O is a
 .\"O .B (
 .\"O then the string after the parenthesis is interpreted as an indirect offset.
-ľÁ°¤Î
+直前の
 .B >
-¤Îľ¸å¤Îʸ»ú¤¬
+の直後の文字が
 .B (
-¤Ê¤é¤Ð¡¢³ç¸Ì¤Î¸å¤Îʸ»úÎó¤Ï´ÖÀÜ¥ª¥Õ¥»¥Ã¥ÈÃͤȲò¼á¤µ¤ì¤ë¡£
+ならば、括弧の後の文字列は間接オフセット値と解釈される。
 .\"O That means that the number after the parenthesis is used as an offset in
 .\"O the file.
-¤Ä¤Þ¤ê¡¢³ç¸Ì¤Î¸å¤Î¿ô»ú¤Ï¥Õ¥¡¥¤¥ëÆâ¤Ç¤Î¥ª¥Õ¥»¥Ã¥È¤È¤·¤Æ»È¤ï¤ì¤ë¡£
+つまり、括弧の後の数字はファイル内でのオフセットとして使われる。
 .\"O The value at that offset is read, and is used again as an offset
 .\"O in the file.
-¤³¤Î¥ª¥Õ¥»¥Ã¥È°ÌÃ֤ˤ¢¤ëÃͤ¬Æɤ߹þ¤Þ¤ì¡¢
-Æɤ߹þ¤Þ¤ì¤¿Ãͤ¬¥Õ¥¡¥¤¥ëÃæ¤Ç¤Î¥ª¥Õ¥»¥Ã¥È¤È¤·¤Æ»È¤ï¤ì¤ë¡£
+このオフセット位置にある値が読み込まれ、
+読み込まれた値がファイル中でのオフセットとして使われる。
 .\"O Indirect offsets are of the form:
 .\"O .BI (( x [.[bslBSL]][+\-][ y ]).
-´ÖÀÜ¥ª¥Õ¥»¥Ã¥ÈÃͤνñ¼°¤Ï°Ê²¼¤Ç¤¢¤ë:
+間接オフセット値の書式は以下である:
 .BI (( x [.[bslBSL]][+\-][ y ]).
 .\"O The value of 
 .\"O .I x
@@ -341,47 +341,47 @@ UNIX 
 .\"O .B [bslBSL] 
 .\"O type specifier.
 .I x
-¤ÎÃͤϥե¡¥¤¥ëÆâ¤Ç¤Î¥ª¥Õ¥»¥Ã¥ÈÃͤȤ·¤Æ»È¤ï¤ì¤ë¡£
-¤½¤Î¥ª¥Õ¥»¥Ã¥È°ÌÃ֤ˤ¢¤ë byte ·¿¡¢short ·¿¡¢long ·¿¤ÎÃͤ¬Æɤ߹þ¤Þ¤ì¤ë¤¬¡¢
-¤É¤Î·¿¤Ë¤Ê¤ë¤«¤Ï·¿»ØÄê»Ò
+の値はファイル内でのオフセット値として使われる。
+そのオフセット位置にある byte 型、short 型、long 型の値が読み込まれるが、
+どの型になるかは型指定子
 .B [bslBSL] 
-¤Ë¤è¤Ã¤Æ·è¤Þ¤ë¡£
+によって決まる。
 .\"O The capitalized types interpret the number as a big endian
 .\"O value, whereas the small letter versions interpret the number as a little
 .\"O endian value.
-Âçʸ»ú¤Ç¼¨¤µ¤ì¤ë·¿¤Ï¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤ÎÃͤȲò¼á¤µ¤ì¡¢
-¾®Ê¸»ú¤Ç¼¨¤µ¤ì¤ë·¿¤Ï¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤ÎÃͤȲò¼á¤µ¤ì¤ë¡£
+大文字で示される型はビッグエンディアンの値と解釈され、
+小文字で示される型はリトルエンディアンの値と解釈される。
 .\"O To that number the value of
 .\"O .I y
 .\"O is added and the result is used as an offset in the file.
-¤³¤Î¿ô¤Þ¤Ç
+この数まで
 .I y
-¤ÎÃͤ˲䨤é¤ì¡¢¤½¤Î·ë²Ì¤¬¥Õ¥¡¥¤¥ëÃæ¤Î¥ª¥Õ¥»¥Ã¥ÈÃͤȤ·¤Æ»È¤ï¤ì¤ë¡£
+の値に加えられ、その結果がファイル中のオフセット値として使われる。
 .\"O The default type if one is not specified is long.
-²¿¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Î¥Ç¥Õ¥©¥ë¥È¤Î·¿¤Ï long ¤Ç¤¢¤ë¡£
+何も指定されていない場合のデフォルトの型は long である。
 .PP
 .\"O Sometimes you do not know the exact offset as this depends on the length of
 .\"O preceding fields.
-Á°¤Î¥Õ¥£¡¼¥ë¥É¤ÎŤµ¤Ë¤è¤Ã¤Æ¥ª¥Õ¥»¥Ã¥ÈÃͤ¬ÊѤï¤ë¤¿¤á¡¢
-Àµ³Î¤Ê¥ª¥Õ¥»¥Ã¥ÈÃͤ¬¤ï¤«¤é¤Ê¤¤¾ì¹ç¤â¤¢¤ë¡£
+前のフィールドの長さによってオフセット値が変わるため、
+正確なオフセット値がわからない場合もある。
 .\"O You can specify an offset relative to the end of the
 .\"O last uplevel field (of course this may only be done for sublevel tests, i.e.
 .\"O test beginning with 
 .\"O .B >
 .\"O ).
-¤³¤Î¾ì¹ç¤Ï¡¢Ä¾Á°¤Î¾å°Ì¥ì¥Ù¥ë¤Î
-¥Õ¥£¡¼¥ë¥É¤Î½ª¤ï¤ê¤«¤é¤ÎÁêÂаÌÃ֤ǥª¥Õ¥»¥Ã¥È¤ò»ØÄê¤Ç¤­¤ë
-(ÅöÁ³¤Ê¤¬¤é¤³¤ÎÊýË¡¤Ï¥µ¥Ö¥ì¥Ù¥ë¤Î¥Æ¥¹¥È¡¢¤Ä¤Þ¤ê
+この場合は、直前の上位レベルの
+フィールドの終わりからの相対位置でオフセットを指定できる
+(当然ながらこの方法はサブレベルのテスト、つまり
 .B >
-¤Ç»Ï¤Þ¤ë¥Æ¥¹¥È¤Ç¤·¤«»È¤¨¤Ê¤¤)¡£
+で始まるテストでしか使えない)。
 .\"O Such a relative offset is specified using
 .\"O .B &
 .\"O as a prefix to the offset.
-¤³¤Î¤è¤¦¤ÊÁêÂÐ¥ª¥Õ¥»¥Ã¥ÈÃͤϡ¢¥ª¥Õ¥»¥Ã¥ÈÃͤÎÁ°¤Ë
+このような相対オフセット値は、オフセット値の前に
 .B &
-¤òÃÖ¤¯¤³¤È¤Ç»ØÄꤹ¤ë¡£
+を置くことで指定する。
 .\"O .SH BUGS
-.SH ¥Ð¥°
+.SH ã\83\90ã\82°
 .\"O The formats 
 .\"O .IR long ,
 .\"O .IR belong ,
@@ -406,19 +406,19 @@ UNIX 
 .IR date ,
 .IR bedate ,
 .I ledate
-¤Î½ñ¼°¤Ï¥·¥¹¥Æ¥à°Í¸¤Ç¤¢¤ë¡£¼±Ê̤µ¤»¤ë¥Õ¥¡¥¤¥ë¤Ï¡¢
-¤³¤ÎŤµ¤¬°ã¤¦¥·¥¹¥Æ¥à¤«¤é»ý¤Ã¤Æ¤¯¤ë¤³¤È¤¬Â¿¤¤¤¿¤á¡¢
-¥Ð¥¤¥ÈÎó¤È¤·¤Æ»ØÄꤹ¤Ù¤­¤À¤í¤¦ (2B, 4B Åù)¡£
+の書式はシステム依存である。識別させるファイルは、
+この長さが違うシステムから持ってくることが多いため、
+バイト列として指定すべきだろう (2B, 4B 等)。
 .PP
 .\"O There is (currently) no support for specified-endian data to be used in
 .\"O indirect offsets.
-(¸½»þÅÀ¤Ç¤Ï) ´ÖÀÜ¥ª¥Õ¥»¥Ã¥ÈÃͤǥ¨¥ó¥Ç¥£¥¢¥ó¤ò»ØÄꤷ¤Æ
-¥Ç¡¼¥¿¤ò°·¤¦¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
+(現時点では) 間接オフセット値でエンディアンを指定して
+データを扱うことはできない。
 .\"O .SH SEE ALSO
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
 .BR file (1)
 .\"O \- the command that reads this file.
-\- ¤³¤Î¥Õ¥¡¥¤¥ë¤òÆɤॳ¥Þ¥ó¥É¡£
+\- このファイルを読むコマンド。
 .\"
 .\" From: guy@sun.uucp (Guy Harris)
 .\" Newsgroups: net.bugs.usg