HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

d
dd(1) dd(1)
swab Swap every pair of input bytes.
noerror Do not stop processing on an input error. If the
sync conversion
symbol is also specified, missing input is replaced with null bytes
and processed normally; otherwise, the input block is omitted from
the output.
notrunc Do not truncate existing output file. Blocks in the output file not
overwritten by this invocation of
dd are preserved.
sync Pad every input block to size
ibs.Ifblock or unblock is also
specified, pad with space characters; otherwise, pad with null
bytes.
Where sizes are required, n indicates a numerical value in bytes. Numbers can be specified using the
forms:
n for n bytes
n
k for n Kbytes (n × 1024),
n
b for n blocks (n × 512), or
n
w for n words (n × 2).
To indicate a product, use x to separate number pairs.
The cbs option is used when block, unblock, ascii or ebcdic conversion is specified. In case of
ascii, cbs characters are placed into the conversion buffer, converted to ASCII, trailing blanks are
trimmed, and a newline is added before sending the line to the output. In case of ebcdic
, ASCII charac-
ters are read into the conversion buffer, converted to EBCDIC, and blanks are added to make up an output
block of size cbs.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
Environment Variables
The following environment variables affect execution of
dd:
LANG determines the locale when LC_ALL and a corresponding variable (beginning with
LC_) do not
specify a locale.
LC_ALL determines the locale used to override any values set by LANG or any environment variables
beginning with LC_.
The LC_CTYPE variable determines the locale for the interpretation of sequences of bytes of text data as
characters (single-byte/multi-byte characters, upper-case/lower-case characters).
The LC_MESSAGES variable determines the language in which messages are written.
RETURN VALUE
Exit values are:
0 Successful completion.
>0 Error condition occurred.
DIAGNOSTICS
Upon completion, dd reports the number of input and output records:
f+p records in Number of full and partial blocks read.
f+p records out Number of full and partial blocks written.
When conv=block is specified and there is at least one truncated block, the number of truncated records
is also reported:
n truncated records
EXAMPLES
Read an EBCDIC tape blocked ten 80-byte EBCDIC card images per block into an ASCII file named x:
dd if=/dev/rmt/c0t0d0BEST of=x ibs=800 cbs=80 conv=ascii,lcase
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 1173