1 .\" Copyright (c) 1989, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" from: @(#)hexdump.1 8.2 (Berkeley) 4/18/94
34 .\" Japanese Version Copyright (c) 2001-2002 Yuichi SATO
35 .\" all rights reserved.
36 .\" Translated Tue 11 Jan 1994
37 .\" by NetBSD jman proj. <jman@spa.is.uec.ac.jp>
38 .\" Updated Sun Jan 14 00:49:38 JST 2001
39 .\" by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
40 .\" Updated Sun Mar 24 11:54:42 JST 2002
41 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
49 .\"O .Nd ascii, decimal, hexadecimal, octal dump
50 .Nd ASCII, 10 進, 16 進, 8 進でダンプする
57 .Op Fl e Ar format_string
60 .Op Fl f Ar format_file
71 .\"O The hexdump utility is a filter which displays the specified files, or
72 .\"O the standard input, if no files are specified, in a user specified
74 hexdump ユーティリティは、指定したファイルを
75 ユーザーが指定したフォーマットで表示するフィルタである。
76 ファイルが指定されていない場合は、標準入力を読み込んでフォーマットする。
78 .\"O The options are as follows:
82 .\"O .Em One-byte octal display .
83 .\"O Display the input offset in hexadecimal, followed by sixteen
84 .\"O space-separated, three column, zero-filled, bytes of input data,
85 .\"O in octal, per line.
89 0 で字詰めした 3 桁の 8 進数で表現し、
90 それを 1 行当たり 16 個、空白で区切って表示する。
92 .\"O .Em One-byte character display .
93 .\"O Display the input offset in hexadecimal, followed by sixteen
94 .\"O space-separated, three column, space-filled, characters of input
99 空白で字詰めした 3 桁 (の ASCII 文字) で表現し、
100 それを 1 行当たり 16 個、空白で区切って表示する。
102 .\"O .Em Canonical hex+ASCII display .
103 .\"O Display the input offset in hexadecimal, followed by sixteen
104 .\"O space-separated, two column, hexadecimal bytes, followed by the
105 .\"O same sixteen bytes in %_p format enclosed in ``|'' characters.
106 .Em 標準的な 16進数 + ASCII での表示。
108 その後に、入力データのキャラクタを 2 桁の 16 進数で表現し、
109 それを 1 行当たり 16 個、空白で区切って表示する。
110 その後に、``|'' で囲まれた中に同じ 16 バイトを
113 .\"O .Em Two-byte decimal display .
114 .\"O Display the input offset in hexadecimal, followed by eight
115 .\"O space-separated, five column, zero-filled, two-byte units
116 .\"O of input data, in unsigned decimal, per line.
117 .Em 2 バイト単位の 10 進数表示。
120 0 で字詰めした 5 桁の符号なし 10 進数で表現し、
121 それを 1 行当たり 8 個、空白で区切って表示する。
122 .It Fl e Ar format_string
123 .\"O Specify a format string to be used for displaying data.
124 データを表示するために使われるフォーマット文字列を指定する。
125 .It Fl f Ar format_file
126 .\"O Specify a file that contains one or more newline separated format strings.
127 .\"O Empty lines and lines whose first non-blank character is a hash mark
130 1 個以上のフォーマット文字列 (改行で区切る) の書かれたファイルを指定する。
131 空行、または空白を除いた最初の文字がハッシュマーク
142 .\"O .Em Two-byte octal display .
143 .\"O Display the input offset in hexadecimal, followed by eight
144 .\"O space-separated, six column, zero-filled, two byte quantities of
145 .\"O input data, in octal, per line.
149 0 で字詰めした 6 桁の 8 進数で表現し、
150 それを 1 行当たり 8 個、空白で区切って表示する。
154 .\"O bytes from the beginning of the input.
160 .\"O is interpreted as a decimal number.
169 .\"O is interpreted as a hexadecimal number,
177 .\"O otherwise, with a leading
180 .\"O is interpreted as an octal number.
186 .\"O Appending the character
193 .\"O causes it to be interpreted as a multiple of
212 .\"O option causes hexdump to display all input data.
214 オプションを指定すると、hexdump に対して全ての入力データを表示させる。
217 .\"O option, any number of groups of output lines, which would be
218 .\"O identical to the immediately preceding group of output lines (except
219 .\"O for the input offsets), are replaced with a line comprised of a
220 .\"O single asterisk.
223 直前の出力行と同じ内容の行 (ただし、入力オフセットは除く) は、
225 1 個のアスタリスクが書かれた行で置き換えられる。
227 .\"O .Em Two-byte hexadecimal display .
228 .\"O Display the input offset in hexadecimal, followed by eight, space
229 .\"O separated, four column, zero-filled, two-byte quantities of input
230 .\"O data, in hexadecimal, per line.
231 .Em 2 バイト単位の 16 進数表示。
234 0 で字詰めした 4 桁の 16 進数で表現し、
235 それを 1 行当たり 8 個、空白で区切って表示する。
238 .\"O For each input file,
240 .\"O sequentially copies the input to standard output, transforming the
241 .\"O data according to the format strings specified by the
245 .\"O options, in the order that they were specified.
252 オプションで指定されたフォーマット文字列に基づいて変換しながら
256 .\"O A format string contains any number of format units, separated by
258 .\"O A format unit contains up to three items: an iteration count, a byte
259 .\"O count, and a format.
260 フォーマット文字列は、空白で区切られた任意の個数の
262 フォーマット単位は最大 3 個の要素、つまり、
263 繰り返し回数・バイト数・フォーマットを含んでいる。
265 .\"O The iteration count is an optional positive integer, which defaults to
267 .\"O Each format is applied iteration count times.
268 繰り返し回数は、オプションとして指定される正の整数である。
270 各フォーマットは繰り返し回数だけ適用される。
272 .\"O The byte count is an optional positive integer.
273 .\"O If specified it defines the number of bytes to be interpreted by
274 .\"O each iteration of the format.
275 バイト数は、オプションとして指定される正の整数である。
277 1 つのフォーマットで処理されるバイト数を示す。
279 .\"O If an iteration count and/or a byte count is specified, a single slash
280 .\"O must be placed after the iteration count and/or before the byte count
281 .\"O to disambiguate them.
282 .\"O Any whitespace before or after the slash is ignored.
283 繰り返し回数とバイト数 (の両方、もしくはどちらか一方) が指定された場合、
285 繰り返し回数の後とバイト数の前にスラッシュを 1 個置かなければならない。
288 .\"O The format is required and must be surrounded by double quote
290 .\"O It is interpreted as a fprintf-style format string (see
291 .\"O .Xr fprintf 3 ) ,
293 .\"O following exceptions:
294 フォーマットは必須で、ダブルクォートマーク (" ") で囲まなければならない。
295 このフォーマットは、fprintf 形式のフォーマット文字列
299 .Bl -bullet -offset indent
301 .\"O An asterisk (*) may not be used as a field width or precision.
302 フィールドの幅や精度としてアスタリスク (*) を使えない。
304 .\"O A byte count or field precision
306 .\"O required for each ``s'' conversion
307 .\"O character (unlike the
309 .\"O default which prints the entire string if the precision is unspecified).
310 個々の変換文字 ``s'' について、バイト数やフィールド精度が必須である
311 (精度が指定されていない場合に全ての文字列を表示する
315 .\"O The conversion characters ``h'', ``l'', ``n'', ``p'' and ``q'' are
317 変換文字 ``h'', ``l'', ``n'', ``p'', ``q'' がサポートされていない。
319 .\"O The single character escape sequences
320 .\"O described in the C standard are supported:
322 1 文字のエスケープシーケンスがサポートされている:
323 .Bd -ragged -offset indent -compact
324 .Bl -column <alert_character>
326 .\"O .It <alert character> \ea
327 .\"O .It <backspace> \eb
328 .\"O .It <form-feed> \ef
329 .\"O .It <newline> \en
330 .\"O .It <carriage return> \er
332 .\"O .It <vertical tab> \ev
345 .\"O Hexdump also supports the following additional conversion strings:
346 hexdump は、他にも以下の変換文字列をサポートする:
348 .It Cm \&_a Ns Op Cm dox
349 .\"O Display the input offset, cumulative across input files, of the
350 .\"O next byte to be displayed.
352 (複数の入力ファイルで通算した値) を表示する。
353 .\"O The appended characters
358 .\"O specify the display base
359 .\"O as decimal, octal or hexadecimal respectively.
364 を後ろに付加すると、表示の際の基数がそれぞれ 10, 8, 16 進数に指定される。
365 .It Cm \&_A Ns Op Cm dox
366 .\"O Identical to the
368 .\"O conversion string except that it is only performed
369 .\"O once, when all of the input data has been processed.
373 ただし、この変換は全ての入力データが処理された後で 1 回だけ実行される。
375 .\"O Output characters in the default character set.
376 .\"O Nonprinting characters are displayed in three character, zero-padded
377 .\"O octal, except for those representable by standard escape notation
379 .\"O which are displayed as two character strings.
381 表示不能な文字は、0 で字詰めした 3 桁の 8 進数で表示される。
382 ただし、標準エスケープ表記で表現される文字 (上記を参照) は、
385 .\"O Output characters in the default character set.
386 .\"O Nonprinting characters are displayed as a single
393 .\"O Output US ASCII characters, with the exception that control characters are
394 .\"O displayed using the following, lower-case, names.
395 .\"O Characters greater than 0xff, hexadecimal, are displayed as hexadecimal
398 ただし、制御文字は以下のような小文字の名前を使って表示される。
399 16 進数で 0xff より大きい文字は、
401 .Bl -column \&000_nu \&001_so \&002_st \&003_et \&004_eo
402 .It \&000\ nul\t001\ soh\t002\ stx\t003\ etx\t004\ eot\t005\ enq
403 .It \&006\ ack\t007\ bel\t008\ bs\t009\ ht\t00A\ lf\t00B\ vt
404 .It \&00C\ ff\t00D\ cr\t00E\ so\t00F\ si\t010\ dle\t011\ dc1
405 .It \&012\ dc2\t013\ dc3\t014\ dc4\t015\ nak\t016\ syn\t017\ etb
406 .It \&018\ can\t019\ em\t01A\ sub\t01B\ esc\t01C\ fs\t01D\ gs
407 .It \&01E\ rs\t01F\ us\t0FF\ del
411 .\"O The default and supported byte counts for the conversion characters
413 変換文字列で使われるデフォルトのバイト数とサポートされるバイト数は、
415 .Bl -tag -width "Xc,_Xc,_Xc,_Xc,_Xc,_Xc" -offset indent
416 .It Li \&%_c , \&%_p , \&%_u , \&%c
417 .\"O One byte counts only.
420 .Li \&%d , \&%i , \&%o ,
421 .Li \&%u , \&%X , \&%x
423 .\"O Four byte default, one, two and four byte counts supported.
424 4 バイトがデフォルト。1, 2, 4 バイトがサポートされている。
426 .Li \&%E , \&%e , \&%f ,
429 .\"O Eight byte default, four byte counts supported.
430 8 バイトがデフォルト。4 バイトがサポートされている。
433 .\"O The amount of data interpreted by each format string is the sum of the
434 .\"O data required by each format unit, which is the iteration count times the
435 .\"O byte count, or the iteration count times the number of bytes required by
436 .\"O the format if the byte count is not specified.
437 各フォーマット文字列によって処理されるデータの量は、
438 各フォーマット単位で必要とされるデータの合計である。
439 この合計は (繰り返し回数)×(バイト数) である。
441 (繰り返し回数)×(フォーマットが必要としているバイト数) である。
443 .\"O The input is manipulated in ``blocks'', where a block is defined as the
444 .\"O largest amount of data specified by any format string.
445 .\"O Format strings interpreting less than an input block's worth of data,
446 .\"O whose last format unit both interprets some number of bytes and does
447 .\"O not have a specified iteration count, have the iteration count
448 .\"O incremented until the entire input block has been processed or there
449 .\"O is not enough data remaining in the block to satisfy the format string.
451 ブロックは、フォーマット文字列で指定される
452 データの塊のうちで最大のもの、と定義される。
453 入力ブロックのデータより少ないバイト数しか処理していないフォーマット文字列で、
454 その中の最後のフォーマット単位で数バイトを処理し、
457 フォーマット文字列に合致するデータがブロックになくなるまで、
460 .\"O If, either as a result of user specification or hexdump modifying
461 .\"O the iteration count as described above, an iteration count is
462 .\"O greater than one, no trailing whitespace characters are output
463 .\"O during the last iteration.
465 または hexdump が上で説明したように繰り返し回数を変更した結果、
467 最後の繰り返しにおける末尾の空白は出力されない。
469 .\"O It is an error to specify a byte count as well as multiple conversion
470 .\"O characters or strings unless all but one of the conversion characters
475 バイト数を複数の変換文字と共に指定すると、
482 .\"O If, as a result of the specification of the
484 .\"O option or end-of-file being reached, input data only partially
485 .\"O satisfies a format string, the input block is zero-padded sufficiently
486 .\"O to display all available data (i.e. any format units overlapping the
487 .\"O end of data will display some number of the zero bytes).
489 オプションで指定したバイト数分、またはファイル終端に達したときに、
490 入力データがフォーマット文字列の一部分にしか満たさない場合、
491 有効なデータを全て表示するために、入力ブロックには適切な数の 0 が補われる
492 (すなわち、データの終端にまたがっているフォーマット単位は、
495 .\"O Further output by such format strings is replaced by an equivalent
496 .\"O number of spaces.
497 このようなフォーマット文字列によるさらなる出力は、
499 .\"O An equivalent number of spaces is defined as the number of spaces
502 .\"O conversion character with the same field width
503 .\"O and precision as the original conversion character or conversion
504 .\"O string but with any
508 .\"O conversion flag characters
509 .\"O removed, and referencing a NULL string.
510 等数の空白とは、元々の変換文字とフィールド幅と精度は同じで、
517 変換文字が NULL 文字列を参照した場合に出力される数の空白である。
519 .\"O If no format strings are specified, the default display is equivalent
520 .\"O to specifying the
529 .\"O exits 0 on success and >0 if an error occurred.
532 エラーが起こった場合は、1 以上を返して終了する。
535 .\"O Display the input in perusal format:
536 入力を perusal (詳しく閲覧する) フォーマットで表示する:
537 .Bd -literal -offset indent
538 "%06.6_ao " 12/1 "%3_u "
543 .\"O Implement the \-x option:
545 .Bd -literal -offset indent
547 "%07.7_ax " 8/2 "%04x " "\en"
553 .\"O utility is expected to be
562 FreeBSD jpman project <http://www.jp.freebsd.org/man-jp/>