DD(1) SysV DD(1)
NAME
dd - convert and copy a file
SYNOPSIS
dd [ option=value ] ...
DESCRIPTION
dd copies the specified input file to the specified output with possible
conversions. By default, it uses the standard input and output. You may
specify the input and output block size. After completion, dd reports
the number of whole and partial input and output blocks.
OPTIONS/VALUE PAIRS
if=file Inputs filename; standard input is the default.
of=file Outputs filename; standard output is the default.
ibs=n Inputs block size n bytes; 512 is the default.
obs=n Outputs block size; 512 is the default.
bs=n Sets both input and output block size, superseding ibs
and obs.
cbs=n Conversion buffer size; used only if conv=ascii or
conv=ebcdic is specified. In the former case, cbs
characters are placed into the conversion buffer,
converted to ASCII, and trimmed of any trailing blanks.
Newlines are then added before sending the line to the
output. In the latter case, ASCII characters are read
into the conversion buffer, converted to EBCDIC, and
blanks are added to make up an output block of size cbs.
skip=n Skips n input blocks before starting copy.
seek=n Seeks n blocks from the beginning of the output file
before copying.
count=n Copies only n input blocks.
conv=ascii Converts EBCDIC to ASCII.
ebcdic Converts ASCII to EBCDIC.
ibm Maps ASCII to EBCDIC in a slightly different way than the
above case.
lcase Maps alphabetics to lowercase.
ucase Maps alphabetics to uppercase.
swab Swaps every pair of bytes.
noerror Does not stop processing on an error.
sync Pads every input block to ibs.
... , ... Represents several comma-separated conversions.
Where sizes are specified, a number of bytes is expected. A number may
end with k, b, or w to specify multiplication by 1024, 512, or 2,
respectively; a pair of numbers may be separated by x to indicate a
product.
The ASCII/EBCDIC conversion tables are taken from the 256-character
standard of the CACM (November, 1968). The ibm conversion, while less
accepted as a standard, corresponds better to certain IBM print train
conventions.
EXAMPLE
To read an EBCDIC tape blocked with ten 80-byte EBCDIC card images per
block into the ASCII file x, use the following:
# dd if=/dev/rmt0 of=x ibs=800 cbs=80
BUGS
SysV does not support some raw I/O devices typically used with dd.
Newlines are inserted only on conversion to ASCII. Padding is done only
on conversion to EBCDIC. These should be separate options.
DIAGNOSTICS
f+p blocks in(out)
Numbers of full and partial blocks read(written).
SEE ALSO
cp (1).