Name
dd
Synopsis
dd [option = value]
Makes a copy of an input file (if=
), or standard
input if no named input file, 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.
dd
does not preserve resource forks or HFS
metadata when copying files that contain them.
Options
-
bs=
n
Set input and output block size to n bytes; this option supersedes
ibs
andobs
.-
cbs
=n
Set the size of the conversion buffer (logical record length) to n bytes. Use only if the conversion flag is
ascii
,asciib
,ebcdic
,ebcdicb
,ibm
,ibmb
,block
, orunblock
.-
conv=
flags
Convert the input according to one or more (comma-separated) flags listed next. The first six flags are mutually exclusive. The next two are mutually exclusive with each other, as are the following two.
-
ascii
EBCDIC to ASCII.
-
asciib
EBCDIC to ASCII, using BSD-compatible conversions.
-
ebcdic
ASCII to EBCDIC.
-
ebcdicb
ASCII to EBCDIC, using BSD-compatible conversions.
-
ibm
ASCII to EBCDIC with IBM conventions.
-
ibmb
ASCII to EBCDIC with IBM conventions, using BSD-compatible conversions.
-
block
Variable-length records (i.e., those terminated by a newline) to fixed-length records.
-
unblock
Fixed-length records to variable length.
-
lcase
Uppercase to lowercase.
-
ucase
Lowercase to ...
-
Get Mac OS X in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.