.TH DD 1.SH NAMEdd \- convert and copy a file.SH SYNOPSIS.B dd[.I option value]\&....SH DESCRIPTION.I Dd\^copies the specified input fileto the specified output withpossible conversions.The standard input and output are used by default.The input and output block size may bespecified to take advantage of raw physical I/O.The options are.TF "oseek\ \ ".PD.TP.BI -if\ fOpen file.I ffor input..TP.BI -of\ fOpen file.I ffor output..TP.BI -ibs\ n\^Set input block size to.I n\^bytes (default 512)..TP.BI -obs\ n\^Set output block size (default 512)..TP.BI -bs\ n\^Set both input and output block size,superseding.I ibs\^and.IR obs .If no conversion is specified,preserve the input block size instead of packing short blocksinto the output buffer.This is particularly efficient since no in-core copy need be done..TP.BI -cbs\ n\^Set conversion buffer size..TP.BI -skip\ n\^Skip.I ninput records before copying..TP.BI -iseek\ n\^Seek.I nrecords forward on input filebefore copying..TP.BI -files\ n\^Catenate.I n input files (useful only for magnetic tape or similar input device)..TP.BI -oseek\ n\^Seek.I n\^records from beginning of output file before copying..TP.BI -count\ n\^Copy only.I ninput records..HP\fL-conv\ ascii\ \ \ \ \fRConvert.SM EBCDICto.SM ASCII..PD0.RS "\w'\fL-conv\ \fP'u".TP "\w'\fLunblock\ \ \fP'u".B ebcdicConvert.SM ASCIIto.SM EBCDIC..TP.B ibmLike.B ebcdicbut with a slightly different character map..TP.B blockConvert variable length.SM ASCIIrecords to fixed length..TP.B unblockConvert fixed length.SM ASCIIrecords to variable length..TP.B lcaseMap alphabetics to lower case..TP.B ucaseMap alphabetics to upper case..TP.B swabSwap every pair of bytes..TP.B noerrorDo not stop processing on an error..TP.B syncPad every input record to.I ibs\^bytes..RE.PD.PP.fiWhere sizes are specified,a number of bytes is expected.A number may end with.L kor.LR bto specify multiplication by1024 or 512 respectively;a pair of numbers may be separated by.L xto indicate a product.Multiple conversions may be specified in the style:.LR "-conv ebcdic,ucase" ..PP.L Cbs\^is used only if.LR ascii\^ ,.LR unblock\^ ,.LR ebcdic\^ ,.LR ibm\^ ,or.L block\^conversion is specified.In the first two cases,.I ncharacters are copied into the conversion buffer, any specifiedcharacter mapping is done,trailing blanks are trimmed and new-line is addedbefore sending the line to the output.In the latter three cases, characters are read into theconversion buffer and blanks are added to make up anoutput record of size.IR n .If.L cbs\^is unspecified or zero, the.LR ascii\^ ,.LR ebcdic\^ ,and.L ibm\^options convert the character set without changing the blockstructure of the input file; the.L unblock\^and.L block\^options become a simple file copy..SH SOURCE.B /appl/cmd/dd.b.SH DIAGNOSTICS.I Ddreports the number of full + partial input and outputblocks handled..SH "SEE ALSO".IR cat (1),.IR cp (1)
.TH DD 1
.SH NAME
dd \- convert and copy a file
.SH SYNOPSIS
.B dd
[
.I option value
]
\&...
.SH DESCRIPTION
.I Dd\^
copies the specified input file
to the specified output with
possible conversions.
The standard input and output are used by default.
The input and output block size may be
specified to take advantage of raw physical I/O.
The options are
.TF "oseek\ \ "
.PD
.TP
.BI -if\ f
Open file
.I f
for input.
.TP
.BI -of\ f
Open file
.I f
for output.
.TP
.BI -ibs\ n\^
Set input block size to
.I n\^
bytes (default 512).
.TP
.BI -obs\ n\^
Set output block size (default 512).
.TP
.BI -bs\ n\^
Set both input and output block size,
superseding
.I ibs\^
and
.IR obs .
If no conversion is specified,
preserve the input block size instead of packing short blocks
into the output buffer.
This is particularly efficient since no in-core copy need be done.
.TP
.BI -cbs\ n\^
Set conversion buffer size.
.TP
.BI -skip\ n\^
Skip
.I n
input records before copying.
.TP
.BI -iseek\ n\^
Seek
.I n
records forward on input file
before copying.
.TP
.BI -files\ n\^
Catenate
.I n
input files (useful only for magnetic tape or similar input device).
.TP
.BI -oseek\ n\^
Seek
.I n\^
records from beginning of output file before copying.
.TP
.BI -count\ n\^
Copy only
.I n
input records.
.HP
\fL-conv\ ascii\ \ \ \ \fRConvert
.SM EBCDIC
to
.SM ASCII.
.PD0
.RS "\w'\fL-conv\ \fP'u"
.TP "\w'\fLunblock\ \ \fP'u"
.B ebcdic
Convert
.SM ASCII
to
.SM EBCDIC.
.TP
.B ibm
Like
.B ebcdic
but with a slightly different character map.
.TP
.B block
Convert variable length
.SM ASCII
records to fixed length.
.TP
.B unblock
Convert fixed length
.SM ASCII
records to variable length.
.TP
.B lcase
Map alphabetics to lower case.
.TP
.B ucase
Map alphabetics to upper case.
.TP
.B swab
Swap every pair of bytes.
.TP
.B noerror
Do not stop processing on an error.
.TP
.B sync
Pad every input record to
.I ibs\^
bytes.
.RE
.PD
.PP
.fi
Where sizes are specified,
a number of bytes is expected.
A number may end with
.L k
or
.LR b
to specify multiplication by
1024 or 512 respectively;
a pair of numbers may be separated by
.L x
to indicate a product.
Multiple conversions may be specified in the style:
.LR "-conv ebcdic,ucase" .
.PP
.L Cbs\^
is used only if
.LR ascii\^ ,
.LR unblock\^ ,
.LR ebcdic\^ ,
.LR ibm\^ ,
or
.L block\^
conversion is specified.
In the first two cases,
.I n
characters are copied into the conversion buffer, any specified
character mapping is done,
trailing blanks are trimmed and new-line is added
before sending the line to the output.
In the latter three cases, characters are read into the
conversion buffer and blanks are added to make up an
output record of size
.IR n .
If
.L cbs\^
is unspecified or zero, the
.LR ascii\^ ,
.LR ebcdic\^ ,
and
.L ibm\^
options convert the character set without changing the block
structure of the input file; the
.L unblock\^
and
.L block\^
options become a simple file copy.
.SH SOURCE
.B /appl/cmd/dd.b
.SH DIAGNOSTICS
.I Dd
reports the number of full + partial input and output
blocks handled.
.SH "SEE ALSO"
.IR cat (1),
.IR cp (1)