d

dd(1)

dd(1)

NAME

dd - convert, reblock, translate, and copy a (tape) ®le

SYNOPSIS

dd[option=value] ...

DESCRIPTION

ddcopies the speci®ed input ®le to the speci®ed output ®le with possible conversions. The standard input and output are used by default. Input and output block size can be speci®ed to take advantage of raw phy- sical I/O. Upon completion, dd reports the number of whole and partial input and output records.

Options

ddrecognizes the following option=value pairs:

if=file

Input ®le name; default is standard input.

of=file

Output ®le name; default is standard output. The output ®le is created using the

 

same owner and group used by creat().

ibs=n

Input block size is n bytes; default is 512.

obs=n

Output block size is n bytes; default is 512.

bs=n

Set both input and output block size to the same size, superseding ibs and obs.

 

This option is particularly ef®cient if no conversion (conv option) is speci®ed, because

 

no in-core copy is necessary.

cbs=n

Conversion buffer size is n bytes.

skip=n

Skip n input blocks before starting copy.

iseek=n

Skip n input blocks before starting copy. (This is an alias for the skip option.)

seek=n

Skip n blocks from beginning of output ®le before copying.

oseek=n

Skip n blocks from beginning of output ®le before copying. (This is an alias for the

 

seek option.)

count=n

Copy only n input blocks.

files=n

Copy and concatenate n input ®les. This option should be used only when the input

 

®le is a magnetic tape device.

conv=value [,value ...]

Where values are comma-separated symbols from the following list.

ascii

Convert EBCDIC to ASCII.

ebcdic

Convert ASCII to EBCDIC.

ibm

Convert ASCII to EBCDIC using an alternate conversion table.

 

The ascii, ebcdic, and ibm values are mutually exclusive.

block

Convert each newline-terminated or end-of-®le-terminated input

 

record to a record with a ®xed length speci®ed by cbs. Any new-

 

line character is removed, and space characters are used to ®ll the

 

block to size cbs. Lines that are longer than cbs are truncated;

 

the number of truncated lines (records) is reported (see DIAGNOS-

 

TICS below).

 

 

The block and

unblock values are mutually exclusive.

unblock

Convert ®xed-length input records to variable-length records. For

 

each input record, cbs bytes are read, trailing space characters

 

are deleted, and a newline character is appended.

lcase

Map upper-case input characters to the corresponding lower-case

 

characters.

 

 

The lcase and

ucase values are mutually exclusive.

ucase

Map lower-case input characters to the corresponding upper-case

 

characters.

 

Section 1172

− 1 −

HP-UX Release 11i: December 2000