.po 1i .TH DD 1 Bell .V 08/15/84 16:45:42 .\" @[$]dd.1 1.10 08/15/84 16:45:42 - Zilog Inc. .ad .fi .SH NAME dd \- convert and copy a file .SH SYNOPSIS .B dd [\fIoption\fB=\fIvalue\fR] ... .SH DESCRIPTION .B 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 can be specified to take advantage of raw physical I/O. .PP 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, .B dd\^ reports the number of whole and partial input and output blocks. .SH OPTIONS .TP "\w'\fBconv=.\|.\|.\ ,\ .\|.\|.\ \ \fP'u" .I option\^ .I values\^ .sp .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 .TP .BI cbs= n\^ conversion buffer size .TP .B conv=ascii convert \s-1EBCDIC\s0 to \s-1ASCII\s0 .RS "\w'\fBconv=\fP'u" .TP "\w'\fB.\|.\|.\ ,\ .\|.\|.\ \ \fP'u" .B ebcdic convert \s-1ASCII\s0 to \s-1EBCDIC\s0 .TP .B ibm slightly different map of \s-1ASCII\s0 to \s-1EBCDIC\s0 .TP .B lcase map alphabetics to lower case .TP .B noerror do not stop processing on an error .TP .B swab swap every pair of bytes .TP .B sync pad every input record to .I ibs\^ .TP .B ucase map alphabetics to upper case .TP .B ".\|.\|. , .\|.\|." several comma-separated conversions .RE .TP .BI count= n\^ copy only .IR n "" input records .TP .BI files= n\^ skip .IR n "" files on (tape) input before starting copy .TP .BI ibs= n\^ input block size .I n\^ bytes (default 512) .TP .BI if= file\^ input file name; standard input is default .TP .BI obs= n\^ output block size (default 512) .TP .BI of= file\^ output file name; standard output is default .TP .BI seek= n\^ seek \fIn\fR records from beginning of output file before copying .TP .BI skip= n\^ skip .IR n "" input records before starting copy .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 dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase .RE .PP Note the use of raw magtape. .B 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). .SH DIAGNOSTICS .I "f+p records in(out)" .br numbers of full and partial records read(written) .sp .SH LIMITATIONS 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.