68

I print MBR with hexdump and I get the following output:

000001a0  67 60 6f 70 65 72 61 74  69 6e 67 60 73 79 73 74  |g`operating`syst|
000001b0  65 6d 00 40 00 63 7b da  c5 f5 61 68 00 40 00 40  |[email protected]{...ah.@.@|
000001c0  00 40 00 40 00 40 00 40  00 40 00 40 00 40 00 40  |.@.@.@.@.@.@.@.@|
*
000001f0  00 40 00 40 00 40 00 40  00 40 00 40 00 40 55 ea  |.@.@.@.@.@.@.@U.|
00000200

What does the astersik * mean in the output?

slhck
  • 223,558
  • 70
  • 607
  • 592
Rodnower
  • 2,119
  • 6
  • 31
  • 46

2 Answers2

86

A line in the hexdump output consisting just a * means same as the line above. This is mentioned in the hexdump's manpage at the -v option (easy to be overlooked).

JeffThompson
  • 185
  • 1
  • 10
ott--
  • 2,201
  • 1
  • 15
  • 15
  • 1
    Thanks! That was super important for my parser to take into account! – BuvinJ Jul 21 '16 at 21:03
  • 11
    @BuvinJ (or rather anyone else): You can just pass `-v` to avoid this, so that your parser doesn't need to take it into account. – ShreevatsaR Mar 25 '17 at 03:05
  • `*` can mean one line of more, as many as there are until the proper offset. – Smeterlink Apr 06 '20 at 13:05
  • This is super confusing when it's actually the first and only thing that `hexdump` shows, but what it really means is you've got a file with nothing but zeros in it. – detly Jul 27 '21 at 01:12
2

As mentioned in the comments, without to verbose option to hexdump, -v, the asterisk indicates "same as above". Most likely seen on empty files or parts thereof:

> hexdump -C -s 12 -n 32 test-data/blk00000.dat
0000000c  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000002c

Adding the option -v to hexdump gives the full result, which is especially useful, if the output is used as input to some other process:

> hexdump -v -C -s 12 -n 32 test-data/blk00000.dat
0000000c  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000001c  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000002c

(Answer added for completeness)

raoulsson
  • 447
  • 2
  • 10
  • 20