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:
“Being dismantled before our eyes are not just individual programs that politicians cite as too expensive but the whole idea that society has a stake in the well-being of children down the block and the security of families on the other side of town. Whether or not kids eat well, are nurtured and have a roof over their heads is not just a consequence of how their parents behave. It is also a responsibility of societybut now apparently a diminishing one.”
—Richard B. Stolley (20th century)
“Our brains are no longer conditioned for reverence and awe. We cannot imagine a Second Coming that would not be cut down to size by the televised evening news, or a Last Judgment not subject to pages of holier-than-Thou second- guessing in The New York Review of Books.”
—John Updike (b. 1932)