Dd (Unix) - Block Size

Block Size

A block is a unit measuring the number of bytes that are read, written, or converted at one time. Command line options can specify a different block size for input/reading (ibs) compared to output/writing (obs), though the block size (bs) option will override both ibs and obs. The default value for both input and output block sizes is 512 bytes (the block size of Unix block devices). The count option for copying is measured in blocks, as are both the skip count for reading and seek count for writing. Conversion operations are also affected by the "conversion block size" (cbs).

For some uses of the dd command, block size may have an effect on performance. For example, when recovering data from a hard disk, a small block size will generally cause the most bytes to be recovered. For greater speed during copy operations, a larger block size may be used. When dd is used for network transfers, the block size may have an impact on packet size, depending on the network protocol used.

The value provided for block size options is interpreted as a decimal (base 10) integer, and can also include suffixes to indicate multiplication. The suffix w means multiplication by 2, b means 512, k means 1024, M means 1024 × 1024, G means 1024 × 1024 × 1024, and so on. Additionally, some implementations understand the x character as a multiplication operator for both block size and count parameters.

For example, a block size such as bs=2x80x18b is interpreted as 2 × 80 × 18 × 512 = 1474560 bytes, the exact size of a 1440 KiB floppy disk.

Read more about this topic:  Dd (Unix)

Famous quotes containing the words block and/or size:

    Of course I lie to people. But I lie altruistically—for our mutual good. The lie is the basic building block of good manners. That may seem mildly shocking to a moralist—but then what isn’t?
    Quentin Crisp (b. 1908)

    Beauty depends on size as well as symmetry. No very small animal can be beautiful, for looking at it takes so small a portion of time that the impression of it will be confused. Nor can any very large one, for a whole view of it cannot be had at once, and so there will be no unity and completeness.
    Aristotle (384 B.C.–322 B.C.)