
dd | 111
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
dd
dd options
Make a copy of an input file (if) using the specified conditions, and
send the results to the output file (or standard output if of is not
specified). Any number of options can be supplied, although if and
of are the most common and are usually specified first. Because dd
can handle arbitrary block sizes, it is useful when converting
between raw physical devices.
Options
bs=n
Set input and output block size to n bytes; this option over-
rides ibs and obs.
cbs=n
Set the size of the conversion buffer (logical record length) to n
bytes. Use only if the conversion flag is ascii, ebcdic, ibm,
block, or unblock.
conv=flags
Convert the input according to one or more (comma-
separated) flags listed next. The first five flags are mutually
exclusive.
ascii
EBCDIC to ASCII.
ebcdic
ASCII to EBCDIC.
ibm
ASCII to EBCDIC with IBM conventions.
block
Variable-length records (i.e., those terminated by a
newline) to fixed-length records.
unblock
Fixed-length records to variable-length records.
lcase
Uppercase to lowercase.
ucase
Lowercase to uppercase.
noerror
Continue processing after read errors.
notrunc
Don’t truncate output file.
swab
Swap each pair of input bytes.
sync
Pad input blocks to ibs with trailing zeros.
count=n
Copy only n input blocks.