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.dat0000000c 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.dat0000000c 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)
I'm a seasoned expert in low-level data manipulation and Unix-like command-line utilities, and my extensive experience in this field allows me to provide insightful information on the topic at hand. I've delved into the intricacies of data representation, hexadecimal encoding, and the practical use of tools like hexdump.
Now, let's break down the concepts used in the provided article:
-
hexdump:
hexdump
is a command-line utility in Unix and Unix-like operating systems that displays the hexadecimal content of binary files. It is a valuable tool for inspecting and analyzing the raw contents of files. -
-C option: The
-C
option is used withhexdump
to display the output in a traditional hexadecimal and ASCII format. This format makes it easier for users to interpret the data, with the hexadecimal values on one side and their corresponding ASCII representation on the other. -
-s option: The
-s
option inhexdump
allows users to specify an offset, indicating the starting point from which the data should be displayed. In the provided example,-s 12
denotes that the display should begin 12 bytes into the file. -
-n option: The
-n
option specifies the number of bytes to be displayed byhexdump
. In the given command,-n 32
indicates that 32 bytes of data should be shown starting from the specified offset. -
-v option: The
-v
option, when added tohexdump
, stands for verbose. In the absence of this option, consecutive identical lines are represented with an asterisk (*) to indicate that the content is the same as the previous line. This is particularly useful for dealing with large files or empty sections where the output might be repetitive. -
Practical Example: The article illustrates the difference between using
hexdump
with and without the-v
option. Without-v
, the tool condenses identical lines with an asterisk, which is helpful in scenarios like empty files or sections of files. However, adding the-v
option results in a more detailed output, which can be crucial when the hexdump output serves as input for other processes.
Understanding these concepts empowers users to efficiently analyze and manipulate binary data using hexdump
in various scenarios.