.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, it 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 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 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 .I ascii\^ or .I ebcdic\^ conversion is specified. In the former case .I cbs\^ characters are placed into the conversion buffer, converted to \s-1ASCII\s0, and trailing blanks trimmed and new-line added before sending the line to the output. In the latter case \s-1ASCII\s0 characters are read into the conversion buffer, converted to \s-1EBCDIC\s0, and blanks added to make up an output record of size .IR cbs . .PP After completion, .I dd\^ reports the number of whole and partial input and output blocks. .SH EXAMPLE This command will read an \s-1EBCDIC\s0 tape blocked ten 80-byte \s-1EBCDIC\s0 card images per record into the \s-1ASCII\s0 file .BR x\| : .PP .RS .nf dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase .fi .RE .PP Note the use of raw magtape. .I Dd\^ is especially suited to I/O on the raw physical devices because it allows reading and writing in arbitrary record sizes. .SH "SEE ALSO" cp(1). .if t .bp .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. .PP New-lines are inserted only on conversion to \s-1ASCII\s0; padding is done only on conversion to \s-1EBCDIC\s0. These should be separate options.