dd
dd
Purpose
Copy blocks of data from standard input to standard output (and optionally convert the data from one format to another).
Syntax
dd
option1
=
value1 option2
=
value2 option3
=
value3 ...
Options
if=
file reads from the specified file instead of standard input.
of=
file writes to the specified file instead of standard output.
ibs=
nbytes
reads blocks of nbytes
bytes at a time.
ibs=
nbytes
writes blocks of nbytes
at a time.
bs=
nbytes
reads and writes blocks of nbyte
bytes at a time.
cbs=
nbytes
converts nbytes
bytes at a time.
skip=
nblocks
skips nblocks
input blocks from the beginning of the input file.
seek=
nblocks
skips nblocks
output blocks in the output file.
count=
nblocks
copies nblocks
blocks from input to output.
conv=
code
performs conversion; code
can be one of following:
ascii
converts EBCDIC to ASCII.
ebcdic
converts ASCII to EBCDIC.
lcase
converts to lowercase.
ucase
converts to uppercase.
swab
swaps every pair of input bytes.
noerror
continues after read errors.
(Note: EBCDIC is a character-encoding format used in IBM mainframes.)
Description
The dd
command copies blocks of data from standard input to standard output, optionally converting the data as the copying proceeds. Typically, dd
is used to copy data directly from one device to another. For example, you can copy the Linux kernel (/boot/vmlinuz
) to a diskette with the following command: dd if=/boot/ vmlinuz of=/dev/fd0