hexdump

When hexdump is used with a -x option, are the bytes to the right of each group low addresses?


When I use hexdump directly, the output is in the form of two-byte sets, but when I use the -C option, I find that the output order has changed.

$hexdump -x a.out
0000000 652f 6374 702f 7361 7773 0a64
$hexdump -C a.out
0000000 2f 65 74 63 2f 70 61 73  73 77 64 0a  ....

My assumption is that the address of 2f is 0000000, the address of 65 is 0000001, and the address of 74 is 0000002... Is it right?


Solution

  • Yes, that is correct.