Simple Sand Samples |
説明のないとってもシンプルなサンプルプログラム集
COBOL | awk | C言語 | D言語 | GO言語 | Lua | Vim |
bash | Perl | Gauche | Clojure | CLISP | EmacsLisp | VimScript |
tcsh | Ruby | Groovy | Java | C# | VBScript | JavaScript |
Io言語 | Python | Erlang | Scala | VB.NET | Excel/VBA | PHP |
Tcl | Haskell | OCaml | PowerShell | Windows | Unix/Linux |
Linuxコマンド > hexdump バイナリダンプ
|
|
バイナリファイルを16進ダンプする(2バイト毎)
~$ hexdump testfile.bin0000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
0000010 1110 1312 1514 1716 1918 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000070 0000 0000 0000 7776 7978 7b7a 7d7c 7f7e
0000080
~$
省略せずに16進ダンプする(2バイト毎)
~$ hexdump -v testfile.bin0000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
0000010 1110 1312 1514 1716 1918 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
0000060 0000 0000 0000 0000 0000 0000 0000 0000
0000070 0000 0000 0000 7776 7978 7b7a 7d7c 7f7e
0000080
~$
省略せずに16進ダンプする(2バイト毎)
~$ hexdump -e '"%07_ax " 16/1 "%02x " "\n"' testfile.bin0000000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
0000010 10 11 12 13 14 15 16 17 18 19 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000070 00 00 00 00 00 00 76 77 78 79 7a 7b 7c 7d 7e 7f
~$
省略なし、アドレスなし、8列16進ダンプする(1バイト毎)
~$ hexdump -ve '8/1 "%02x " "\n"' testfile.bin00 01 02 03 04 05 06 07
08 09 0a 0b 0c 0d 0e 0f
10 11 12 13 14 15 16 17
18 19 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 76 77
78 79 7a 7b 7c 7d 7e 7f
~$
省略なし、アドレスなし、1列16進ダンプする(1バイト毎)
~$ hexdump -ve '/1 "%02x\n"' testfile.bin00
01
02
03
04
05
06
07
08
09
0a
0b
0c
0d
0e
0f
10
11
12
13
14
15
16
17
18
19
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
76
77
78
79
7a
7b
7c
7d
7e
7f
~$