V8/usr/man/man1/dd.1

Compare this file to the similar file:
Show the results in this format:

.TH DD 1
.SH NAME
dd \- convert and copy a file
.SH SYNOPSIS
.B dd
[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.
.PP
.br
.ns
.TP "\w'\fBconv=.\|.\|.\ ,\ .\|.\|.\ \ \fP'u"
.I option\^
.I values\^
.br
.ns
.TP
.BI if= file\^
input file name; standard input is default
.br
.ns
.TP
.BI of= file\^
output file name; standard output is default
.br
.ns
.TP
.BI ibs= n\^
input block size
.I n\^
bytes (default 512)
.br
.ns
.TP
.BI obs= n\^
output block size (default 512)
.br
.ns
.TP
.BI bs= n\^
set both input and output block size,
superseding
.I ibs\^
and
.IR obs ;
also, 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.
.br
.ns
.TP
.BI cbs= n\^
conversion buffer size
.br
.ns
.TP
.BI skip= n\^
skip
.IR n ""
input records before starting copy
.br
.ns
.TP
.BI files= n\^
copy and concatenate
.IR n ""
input files before terminating (makes sense only
where input is a magtape or similar device).
.br
.ns
.TP
.BI seek= n\^
seek
.I n\^
records from beginning of output file before copying
.br
.ns
.TP
.BI count= n\^
copy only
.IR n ""
input records
.br
.ns
.TP
.B conv=ascii
convert \s-1EBCDIC\s0 to \s-1ASCII\s0
.br
.ns
.RS "\w'\fBconv=\fP'u"
.TP "\w'\fB.\|.\|.\ ,\ .\|.\|.\ \ \fP'u"
.B ebcdic
convert \s-1ASCII\s0 to \s-1EBCDIC\s0
.br
.ns
.TP
.B ibm
slightly different map of \s-1ASCII\s0 to \s-1EBCDIC\s0
.br
.ns
.TP
.B block
convert variable length \s-1ASCII\s0 records to fixed length
.br
.ns
.TP
.B unblock
convert fixed length \s-1ASCII\s0 records to variable length
.br
.ns
.TP
.B lcase
map alphabetics to lower case
.br
.ns
.TP
.B ucase
map alphabetics to upper case
.br
.ns
.TP
.B swab
swap every pair of bytes
.br
.ns
.TP
.B noerror
do not stop processing on an error
.br
.ns
.TP
.B sync
pad every input record to
.I  ibs\^
.br
.ns
.TP
.B ".\|.\|. , .\|.\|."
several comma-separated conversions
.RE
.PP
.fi
Where sizes are specified,
a number of bytes is expected.
A number may end with
.BR k ,
.BR b ,
or
.B w
to specify multiplication by
1024, 512, or 2 respectively;
a pair of numbers may be separated by
.B x
to indicate a product.
.PP
.I Cbs\^
is used only if
.IR ascii\^ ,
.IR unblock\^ ,
.IR ebcdic\^ ,
.IR ibm\^ ,
or
.I block\^
conversion is specified.
In the first two cases,
.I cbs\^
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 cbs .
If
.I cbs\^
is unspecified or zero, the
.IR ascii\^ ,
.IR ebcdic\^ ,
and
.I ibm\^
options convert the character set without changing the block
structure of the input file; the
.I unblock\^
and
.I block\^
options become a simple file copy.
.PP
After completion,
.I dd\^
reports the number of whole and partial input and output
blocks.
.SH EXAMPLE
.TP
dd  if=/dev/rmt0  of=x  ibs=800  cbs=80  conv=ascii,lcase
Read an \s-1EBCDIC\s0 tape blocked ten 80-byte
\s-1EBCDIC\s0 card images per record into an \s-1ASCII\s0 file.
Note the use of raw magtape to handle arbitrary record sizes.
.SH "SEE ALSO"
cp(1), tar(1), cpio(1)
.SH DIAGNOSTICS
.IR "f+p records in(out)" "	numbers of full and partial records read(written)"
.SH BUGS
The \s-1ASCII\s0/\s-1EBCDIC\s0 conversion tables are
taken
from the 256 character standard in
the \s-1CACM\s0 Nov, 1968.
The
.I ibm\^
conversion, while less blessed as a standard,
corresponds better to certain \s-1IBM\s0
print train conventions.
There is no universal solution.
.\"	@(#)dd.1	5.2 of 5/18/82