4

Why does hexdump seem to miss out parts of the file, while xxd does not? The file is 32 bytes. So xxd output is correct.

$ xxd test.bin
0000000: 8888 8888 8888 8888 8888 8888 8888 8888  ................
0000010: 8888 8888 8888 8888 8888 8888 8888 8888  ................
$ hexdump -n32 -x test.bin
0000000    8888    8888    8888    8888    8888    8888    8888    8888
*
0000020
Susan
  • 79

1 Answers1

8

Because you didn't add the -v option to hexdump.

-v Cause hexdump to display all input data. Without the -v option, any number of groups of output lines, which would be identical to the immediately preceding group of output lines (except for the input offsets), are replaced with a line comprised of a single asterisk.

Therefore you need:

$ hexdump  -n32 -xv test.bin
0000000    8888    8888    8888    8888    8888    8888    8888    
0000010    8888    8888    8888    8888    8888    8888    8888    
0000020
garethTheRed
  • 33,957