annotate runtime/doc/xxd-ja.UTF-8.1 @ 33776:9503dc55b5ed v9.0.2108

patch 9.0.2108: [security]: overflow with count for :s command Commit: https://github.com/vim/vim/commit/ac63787734fda2e294e477af52b3bd601517fa78 Author: Christian Brabandt <cb@256bit.org> Date: Tue Nov 14 20:45:48 2023 +0100 patch 9.0.2108: [security]: overflow with count for :s command Problem: [security]: overflow with count for :s command Solution: Abort the :s command if the count is too large If the count after the :s command is larger than what fits into a (signed) long variable, abort with e_value_too_large. Adds a test with INT_MAX as count and verify it correctly fails. It seems the return value on Windows using mingw compiler wraps around, so the initial test using :s/./b/9999999999999999999999999990 doesn't fail there, since the count is wrapping around several times and finally is no longer larger than 2147483647. So let's just use 2147483647 in the test, which hopefully will always cause a failure Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Nov 2023 22:15:10 +0100
parents 33cbd544dc46
children b54304e710f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 .TH XXD 1 "August 1996" "Manual page for xxd"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 .\"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 .\" 21st May 1996
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 .\" Man page author:
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 .\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 .\" Changes by Bram Moolenaar <Bram@vim.org>
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 .SH 名前
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 .I xxd
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 \- 16 進ダンプを作成したり、元に戻したり。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 .SH 書式
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 .B xxd
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 \-h[elp]
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 .B xxd
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 [options] [infile [outfile]]
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 .B xxd
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 \-r[evert] [options] [infile [outfile]]
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 .SH 説明
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 ファイルや標準入力から 16 進ダンプを作成します。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 16 進ダンプから元のバイナリに戻すこともできます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 .BR uuencode (1)
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 .BR uudecode (1)
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
25 のように、バイナリデータを、メールに貼り付け可能な ASCII 形式に変換できたり、標準出力に出力することもできます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 さらに、バイナリファイルにパッチを当てるという使い方もできます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 .SH オプション
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 .I infile
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 を指定しなかった場合は、標準入力が読み込まれます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 .I infile
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 .RB \` \- '
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 を指定した場合も、標準入力から読み込まれます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 .I outfile
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 を指定しなかった (または
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 .RB \` \- '
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 を指定した) 場合は、標準出力に出力されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 .PP
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
39 引数の解釈処理は適当なので注意してください。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
40 パラメータを取らない引数は最初の一文字だけチェックされます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 引数の文字とパラメータの間のスペースは省略可能です。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 パラメータは 10 進数、16 進数、8 進数で指定できます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 .BR \-c8
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 .BR "\-c 8"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 .B \-c 010
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 .B \-cols 8
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 はすべて同じ意味です。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 .IR \-a " | " \-autoskip
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 オートスキップ: 連続した nul 行を一つの '*' で置き換える。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 .IR \-b " | " \-bits
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 ビット (2進数) ダンプ。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 1 オクテットが "1" と "0" の 8 文字で出力されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 各行の行頭には 16 進数の行番号が表示されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 行末には ascii (または ebcdic) で表した場合の文字が表示されます。
33496
33cbd544dc46 patch 9.0.1998: xxd: cannot reverse a bit dump
Christian Brabandt <cb@256bit.org>
parents: 27162
diff changeset
61 このモードでは \-p、\-i は機能しません。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 .TP
7876
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
63 .IR \-e
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
64 リトルエンディアンの 16 進ダンプに切り替える。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
65 このオプションは、バイトのグループをリトルエンディアンのバイト順のワードとして扱います。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
66 標準のグルーピングは 4 バイトですが、
7876
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
67 .RI "" \-g
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
68 を使うことで変更可能です。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
69 このオプションは 16 進ダンプのみに適用され、ASCII (あるいは EBCDIC)
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
70 表示は変更されません。
7876
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
71 このモードでは \-r、\-p、\-i は機能しません。
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
72 .TP
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 .IR "\-c cols " | " \-cols cols"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 一行
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 .RI < cols >
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 オクテットで出力する。標準設定は 16 (\-i: 12, \-ps: 30, \-b: 6)。最大 256。
27162
b19230a8d40a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14372
diff changeset
77 \-ps には最大値がありません。 \-ps 付きの場合、0 を指定すると単一の長い行で出力されます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 .TP
13967
acc62d455f90 Runtime file and translation updates.
Christian Brabandt <cb@256bit.org>
parents: 7876
diff changeset
79 .IR \-C " | " \-capitalize
acc62d455f90 Runtime file and translation updates.
Christian Brabandt <cb@256bit.org>
parents: 7876
diff changeset
80 \-i を使用した際に、C インクルードファイル形式の変数名を大文字にする。
acc62d455f90 Runtime file and translation updates.
Christian Brabandt <cb@256bit.org>
parents: 7876
diff changeset
81 .TP
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 .IR \-E " | " \-EBCDIC
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 右端に出力される文字のエンコーディングを ASCII から EBCDIC に変更する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 16 進ダンプの出力形式は変更されません。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 \-r、\-p、\-i が同時に指定された場合は何の効果もありません。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 .IR "\-g bytes " | " \-groupsize bytes"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 出力を
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 .RI < bytes >
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
90 バイト (2 文字の 16 進数、または 8 文字の 2 進数) ごとにスペースで区切ります。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 区切らずに出力するには
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 .I \-g 0
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 を指定してください。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 .RI < Bytes >
7876
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
95 の標準設定は \fI2\fP で、リトルエンディアンモードの場合は \fI4\fP 、
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
96 2 進ダンプの場合は \fI1\fP です。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
97 ポストスクリプト形式やインクルード形式で出力するときは、このオプションは使われません。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 .IR \-h " | " \-help
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 コマンドの説明を出力して終了する。変換は実行されません。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 .IR \-i " | " \-include
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
103 C インクルードファイル形式で出力します。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
104 入力ファイルの名前が付けられた静的配列の定義が出力されます。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
105 標準入力の場合は定義の中身だけ出力されます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 .IR "\-l len " | " \-len len"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 .RI < len >
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 オクテットだけ出力する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 .TP
7876
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
111 .I \-o offset
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
112 表示されるファイル位置に
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
113 .RI < offset >
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
114 を加算する。
93f747af7b58 commit https://github.com/vim/vim/commit/5e9b2fa9bb0e6061cf18457c173cd141a5dc9c92
Christian Brabandt <cb@256bit.org>
parents: 5178
diff changeset
115 .TP
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 .IR \-p " | " \-ps " | " \-postscript " | " \-plain
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117 ポストスクリプト形式の 16 進ダンプを出力する。別名 プレーン 16 進ダンプ。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 .IR \-r " | " \-revert
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 元に戻す: 16 進ダンプからバイナリ形式に変換 (またはパッチ) します。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 ファイルへ出力する場合、出力先のファイルは切り詰めされません。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 行番号や特定の書式がないプレーン 16 進ダンプを読み込む場合は、
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 .I \-r \-p
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 を指定してください。空白と改行は無視されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 .I \-seek offset
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 .IR \-r
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 の後で使われた場合: 16 進ダンプを出力するファイルの位置に
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 .RI < offset >
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 を加える。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 .I \-s [+][\-]seek
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 infile の
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 .RI < seek >
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 バイト目 (絶対位置、または相対位置) から開始する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 \fI+ \fRは、現在の標準入力の位置から相対的な位置を示します
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
137 (標準入力から読み込むときのみ意味があります)。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
138 \fI\- \fRは、入力の終わりからの文字数を示します
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
139 (\fI+\fR と同時に指定した場合は、現在の標準入力の位置から手前の位置を示します)。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140 \-s 引数を指定しなかった場合は、現在のファイル位置から開始されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
141 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
142 .I \-u
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
143 16 進数の表記に大文字を使います。指定がない場合は小文字で出力されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
144 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
145 .IR \-v " | " \-version
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
146 バージョンを表示します。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
147 .SH 警告
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
148 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
149 .I xxd \-r
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
150 では行番号の評価に関しての暗黙のルールがいくつかあります。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
151 出力ファイルがシーク可能なら、各行の行番号が順番通りに並んでなくても構いません。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
152 位置が飛んでいても重なっていても大丈夫です。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
153 その場合、次の位置に移動するために lseek(2) が使われます。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
154 出力ファイルがシーク不可なら、「隙間」だけが処理可能です。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
155 隙間は null バイトで埋められます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
156 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
157 .I xxd \-r
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
158 は不正な入力をエラーにしません。ゴミは静かに読み飛ばされます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
159 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
160 16 進ダンプを編集するときは注意が必要です。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
161 .I xxd \-r
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
162 は必要な桁 (\-c 引数参照) だけ 16 進データを読み込んで、行の残りを無視します。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
163 つまり、ascii (または ebcdic) を示している列への変更は無視されます。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
164 xxd \-r \-p でプレーン形式 (ポストスクリプト形式) の 16 進ダンプを元に戻す場合は、列の数は影響しません。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
165 2 桁の 16 進数と認識できるものはすべて変換されます。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
166 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
167 \fI% xxd \-i file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
168 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
169
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
170 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
171 \fI% xxd \-i < file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
172 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
173 の結果は違います。注意してください。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
174 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
175 .I xxd \-s +seek
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
176
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
177 .IR "xxd \-s seek" ,
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
178 の違いは、lseek(2) を使って入力を "巻き戻す" かどうかです。'+' が意味を持つのは、入力が標準入力で、xxd
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
179 が起動されたときに標準入力のファイル位置がファイルの先頭ではなかった場合です。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
180 以下の例が分かりやすいかもしれません (もっと混乱するかも!)...
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
181 .PP
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
182 `cat' が既に標準入力を終わりまで読んでいるので、読む前に標準入力を巻き戻す必要がある。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
183 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
184 \fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
185 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
186 ファイル位置 0x480 (=1024+128) 前方から 16 進ダンプする。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
187 `+' は 「現在地からの相対位置」を意味するので、dd が 1k 処理した後から、さらに `128' 進めます。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
188 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
189 \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
190 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
191 ファイル位置 0x100 ( = 1024\-768) から 16 進ダンプする。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
192 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
193 \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
194 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
195 このような使い方はあまりしませんし、`+' を使うこともほとんどないでしょう。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
196 \-s を使うときはいつでも、strace(1) や truss(1) を使って、xxd の働きをチェックすることをお勧めします。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
197 .SH 例
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
200 .BR ファイル
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 の最初の三行 (16 進数で 0x30 バイト) 以降を出力する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
202 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
203 \fI% xxd \-s 0x30 file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
204 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
205 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
206 .BR ファイル
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
207 の最後から三行 (16 進数で 0x30 バイト) を出力する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
208 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
209 \fI% xxd \-s \-0x30 file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
210 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
211 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
212 120 バイトを、平文 16 進ダンプ形式で一行に 20 オクテットずつ出力する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
213 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
214 \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
215 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
216 2e54482058584420312022417567757374203139
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
217 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
218 39362220224d616e75616c207061676520666f72
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
219 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
220 20787864220a2e5c220a2e5c222032317374204d
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
221 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
222 617920313939360a2e5c22204d616e2070616765
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
223 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
224 20617574686f723a0a2e5c2220202020546f6e79
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
225 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
226 204e7567656e74203c746f6e79407363746e7567
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
227 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
228
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
229 .br
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
230 この man ページの先頭から 120 バイトを一行に 12 オクテットずつ 16 進ダンプする。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
231 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
232 \fI% xxd \-l 120 \-c 12 xxd.1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
233 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
234 0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
235 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
236 000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
237 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
238 0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
239 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
240 0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
241 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
242 0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
243 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
244 000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
245 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
246 0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
247 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
248 0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
249 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
250 0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
251 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
252 000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
253 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
254 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
255 xxd.1 の日付部分だけを出力する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
256 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
257 \fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
258 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
259 0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
260 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
261 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
262 .B input_file
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
263
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
264 .B output_file
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
265 にコピーし、先頭に 0x00 を 100 バイト分付け加える。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
266 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
267 \fI% xxd input_file | xxd \-r \-s 100 > output_file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
268 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
269
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
270 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
271 xxd.1 の日付を修正する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
272 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
273 \fI% echo "0000037: 3574 68" | xxd \-r \- xxd.1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
274 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
275 \fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
276 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
277 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
278 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
279 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
280 中身がすべて 0x00 の 65537 バイトのファイルを作成する。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
281 ただし、最後のバイトだけは 'A' (hex 0x41)。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
282 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
283 \fI% echo "010000: 41" | xxd \-r > file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
284 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
285 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
286 作成したファイルをオートスキップを使って 16 進ダンプする。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
287 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
288 \fI% xxd \-a \-c 12 file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
289 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
290 0000000: 0000 0000 0000 0000 0000 0000 ............
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
291 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
292 *
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
293 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
294 000fffc: 0000 0000 40 ....A
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
295 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
296 一文字の 'A' からなる 1 バイトのファイルを作成する。
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
297 '\-r \-s' の後に指定した数値がファイル中の行番号に加算され、結果、余計なバイトが飛ばされる。
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
298 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
299 \fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
300 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
301 .B vim(1)
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
302 の中から xxd をフィルタとして実行し、
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
303 マークされた `a' から `z' までの領域を 16 進ダンプする。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
304 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
305 \fI:'a,'z!xxd\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
306 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
307 .B vim(1)
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
308 の中から xxd をフィルタとして実行し、
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
309 マークされた `a' から `z' までの領域をバイナリに戻す。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
310 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
311 \fI:'a,'z!xxd \-r\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
312 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
313 .B vim(1)
14372
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
314 の中から xxd をフィルタとして実行し、16 進ダンプされた行を元に戻す。
2a4a2dc35c55 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13967
diff changeset
315 戻したい行にカーソルを移動して:
5178
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
316 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
317 \fI!!xxd \-r\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
318 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
319 シリアル行から一文字読み込む
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
320 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
321 \fI% xxd \-c1 < /dev/term/b &\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
322 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
323 \fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
324 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
325 \fI% echo \-n foo > /dev/term/b\fR
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
326 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
327 .SH 返り値
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
328 以下のエラー値が返ります:
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
329 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
330 0
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
331 エラーなし。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
332 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
333 \-1
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
334 操作がサポートされていない (
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
335 .I xxd \-r \-i
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
336 はまだ不可です)。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
337 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
338 1
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
339 引数の解釈に関するエラー。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
340 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
341 2
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
342 入力ファイルに関する問題。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
343 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
344 3
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
345 出力ファイルに関する問題。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
346 .TP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
347 4,5
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
348 指定された位置へシークできなかった。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
349 .SH 関連項目
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
350 uuencode(1), uudecode(1), patch(1)
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
351 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
352 .SH 警告
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
353 この奇妙なツールは作者が使いやすいように作られています。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
354 自己責任で使ってください。ファイルをコピーし、それを調べ、ウィザードたれ。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
355 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
356 .SH バージョン
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
357 このマニュアルは xxd バージョン 1.7 について説明しています。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
358 .SH 著者
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
359 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
360 (c) 1990-1997 by Juergen Weigert
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
361 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
362 <jnweiger@informatik.uni\-erlangen.de>
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
363 .LP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
364 私の功績として自由に配布してください。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
365 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
366 儲かったら教えてください。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
367 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
368 損しても知りません。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
369 .PP
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
370 マニュアルは Tony Nugent
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
371 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
372 <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
373 .br
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
374 によって書かれ、
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
375 Bram Moolenaar が少し変更を加え、
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
376 Juergen Weigert が編集しました。
7a1b782ec64a updated for version 7.4a.015
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
377 .PP