Name

dd

Synopsis

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 (ibs) and output (obs) block size to n bytes; this option overrides ibs and obs set separately.

cbs=n

Set the size of the conversion buffer (logical record length) to n bytes. Use only if the conversion format is ascii, ebcdic, ibm, block, or unblock.

conv=format

Convert the input according to one or more (comma--separated) formats listed next. The first five formats 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.

excl

Fail if the output file already exists.

fdatasync

Physically write the output file before finishing.

fsync

Physically write both the output file and the metadata before finishing.

lcase

Uppercase to lowercase.

nocreate

Do not create an output file.

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.

ucase

Lowercase to uppercase.

count=n

Copy only n input blocks.

ibs=n

Set ...

Get Linux in a Nutshell, 6th Edition 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.