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?

3
  • It's dump and it means same as above.
    – ott--
    Oct 27, 2012 at 21:45
  • OK, wonderfull, I was guessing it, but just wanted be sure :) Can you put it as answer?
    – Rodnower
    Oct 27, 2012 at 21:55
  • * can mean more than one line be careful.
    – Smeterlink
    Apr 6, 2020 at 13:04

2 Answers 2

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).

4
  • 1
    Thanks! That was super important for my parser to take into account!
    – BuvinJ
    Jul 21, 2016 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. Mar 25, 2017 at 3:05
  • * can mean one line of more, as many as there are until the proper offset.
    – Smeterlink
    Apr 6, 2020 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, 2021 at 1: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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .