hexdump

hexdump

hexdump -C FILE_NAME

hexdump 以 hex 显示文件内容。

字节序

如果不加 -C 参数,默认以当前设备的主机字节序 16-bit words 方式显示。

例如,假设文件 test.txt 有下面两行内容,在 X86 Linux (小尾序)机器上:

a
b
# hexdump  test.txt
0000000 0a61 0a62                              
0000004

而加了 -C 参数 (Canonical hex+ASCII display)后才会以标准 hex 方式显示:

# hexdump  -C test.txt
00000000  61 0a 62 0a                                       |a.b.|
00000004

Last update: 2018-06-05 01:51:19 UTC