Hex Dump - Compression of Duplicate Lines

Compression of Duplicate Lines

In the Unix programs od and hexdump, not all lines of display output that contain the same data as the previous line are shown; instead, a line containing just one asterisk is displayed. For example, a block of all zeros is printed as:

0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0000030

This compression feature makes a useful tool for inspecting large files or complete devices for irregularities. In a modern Linux system, it is convenient to scan an entire hard drive to check if it is all blank:

# hexdump /dev/sda (replace sda with the proper name for the device to be scanned)

The -v option causes hexdump and od to display all input data, explicitly:

0000000 0000 0000 0000 0000 0000 0000 0000 0000 0000010 0000 0000 0000 0000 0000 0000 0000 0000 0000020 0000 0000 0000 0000 0000 0000 0000 0000

Read more about this topic:  Hex Dump

Famous quotes containing the words compression, duplicate and/or lines:

    Do they [the publishers of Murphy] not understand that if the book is slightly obscure it is because it is a compression and that to compress it further can only make it more obscure?
    Samuel Beckett (1906–1989)

    O Nature, and O soul of man! how far beyond all utterance are your linked analogies! not the smallest atom stirs or lives in matter, but has its cunning duplicate in mind.
    Herman Melville (1819–1891)

    [Children] do not yet lie to themselves and therefore have not entered upon that important tacit agreement which marks admission into the adult world, to wit, that I will respect your lies if you will agree to let mine alone. That unwritten contract is one of the clear dividing lines between the world of childhood and the world of adulthood.
    Leontine Young (20th century)