O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required