[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
dd
: Convert and copy a file
dd
copies a file (from standard input to standard output, by
default) with a changeable I/O block size, while optionally performing
conversions on it. Synopsis:
dd [option]... |
The program accepts the following options. Also see 2. Common options.
The numeric-valued options below (bytes and blocks) can be followed by a multiplier: `b'=512, `c'=1, `w'=2, `xm'=m, or any of the standard block size suffixes like `k'=1024 (see section 2.2 Block size).
Use different dd
invocations to use different block sizes for
skipping and I/O. For example, the following shell commands copy data
in 512 kB blocks between a disk and a tape, but do not save or restore a
4 kB label at the start of the disk:
disk=/dev/rdsk/c0t1d0s2 tape=/dev/rmt/0 # Copy all but the label from disk to tape. (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape # Copy from tape back to disk, but leave the disk label alone. (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk |
dd
truncates file to zero
bytes (or the size specified with `seek=').
Conversions:
dd
, unlike others, works
when an odd number of bytes are read--the last byte is simply copied
(since there is nothing to swap it with).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |