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:

    For Jews demand signs and Greeks desire wisdom, but we proclaim Christ crucified, a stumbling block to Jews and foolishness to Gentiles...
    Bible: New Testament, 1 Corinthians 1:22-3.

    Learn to shrink yourself to the size of the company you are in. Take their tone, whatever it may be, and excell in it if you can; but never pretend to give the tone. A free conversation will no more bear a dictator than a free government will.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)