Block Bytes
Block Bytes
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 traditional block size of disks,
and POSIX-mandated size of "a block"). 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).
The value provided for block size options is interpreted as a decimal (base 10) integer number of
bytes. It can also contain suffixes to indicate that the block size is an integer number of larger
units than bytes. The suffix w (words) means multiplication by 2, lowercase b (blocks) means
512, lowercase k (kibibytes) means 1024, then uppercase M(Mebibytes) means 1024
1024, G (Gibibytes) means 1024 1024 1024, and so on
for Tebibytes, Exbibytes, Pebibytes, Zebibytes, and Yobibytes. Some implementations also
understand the suffix uppercase B to indicate SI units such as kB (kilobytes) for 1000 bytes or
MB (Megabytes) for 1,000,000 bytes. Thus bs=16M indicates a blocksize of 16 mebibytes
(16,777,216 bytes), or bs=3kB specifies 3,000 bytes.
Additionally, some implementations understand the x character as a multiplication operator for
both block size and count parameters. For example, bs=2x80x18b is interpreted as 2 80 18
512 = 1474560 bytes, the exact size of a 1440 KiB floppy disk.
For some uses of the dd command, block size has an effect on performance. Doing many small
reads or writes is often slower than doing fewer large ones. Using large blocks requires more
RAM and can complicate error recovery. When dd is used with variable-block-size devices such
as tape drives or networks, the block size may determine the tape record size or packet size,
depending on the network protocol used.