Set both input and output block sizes to @var{bytes}.
This makes @command{dd} read and write @var{bytes} per block,
overriding any @samp{ibs} and @samp{obs} settings.
+In addition, if no data-transforming @option{conv} option is specified,
+each input block is copied to the output as a single block,
+without aggregating short reads.
@item cbs=@var{bytes}
@opindex cbs
fputs (_("\
Copy a file, converting and formatting according to the operands.\n\
\n\
- bs=BYTES force ibs=BYTES and obs=BYTES\n\
+ bs=BYTES read and write BYTES bytes at a time\n\
cbs=BYTES convert BYTES bytes at a time\n\
conv=CONVS convert the file as per the comma separated symbol list\n\
count=BLOCKS copy only BLOCKS input blocks\n\
if (blocksize)
input_blocksize = output_blocksize = blocksize;
+ else
+ {
+ /* POSIX says dd aggregates short reads into
+ output_blocksize if bs= is not specified. */
+ conversions_mask |= C_TWOBUFS;
+ }
if (input_blocksize == 0)
input_blocksize = DEFAULT_BLOCKSIZE;
if (output_blocksize == 0)
output_blocksize = DEFAULT_BLOCKSIZE;
- if (input_blocksize != output_blocksize)
- conversions_mask |= C_TWOBUFS;
if (conversion_blocksize == 0)
conversions_mask &= ~(C_BLOCK | C_UNBLOCK);