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)

    There is something to be said for government by a great aristocracy which has furnished leaders to the nation in peace and war for generations; even a Democrat like myself must admit this. But there is absolutely nothing to be said for government by a plutocracy, for government by men very powerful in certain lines and gifted with the “money touch,” but with ideals which in their essence are merely those of so many glorified pawnbrokers.
    Theodore Roosevelt (1858–1919)