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)

    A man’s desire for a son is usually nothing but the wish to duplicate himself in order that such a remarkable pattern may not be lost to the world.
    Helen Rowland (1875–1950)

    Every living language, like the perspiring bodies of living creatures, is in perpetual motion and alteration; some words go off, and become obsolete; others are taken in, and by degrees grow into common use; or the same word is inverted to a new sense or notion, which in tract of time makes an observable change in the air and features of a language, as age makes in the lines and mien of a face.
    Richard Bentley (1662–1742)