.TH DD 1 .SH NAME dd \- convert and copy a file .SH SYNTAX .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 15 .I option .I values .br .ns .TP if= input file name; standard input is default .br .ns .TP of= output file name; standard output is default .br .ns .TP .RI ibs= n input block size .I n bytes (default 512) .br .ns .TP .RI obs= n output block size (default 512) .br .ns .TP .RI bs= n set both input and output block size, superseding .I ibs and .I obs; also, if no conversion is specified, it is particularly efficient since no copy need be done .br .ns .TP .RI cbs= n conversion buffer size .br .ns .TP .RI skip= n skip .IR n "" input records before starting copy .br .ns .TP .RI files= n copy .I n files from (tape) input .br .ns .TP .RI seek= n seek .I n records from beginning of output file before copying .br .ns .TP count=\fIn\fP copy only .IR n "" input records .br .ns .TP conv=ascii .ds h \h'\w'conv='u' convert EBCDIC to ASCII (includes rtrim) .br .ns .IP \*hebcdic convert ASCII to EBCDIC (includes rfill) .br .ns .IP \*hibm slightly different map of ASCII to EBCDIC .br .ns .IP \*hrtrim delete right blanks in \fIcbs\fP and add a new line .br .ns .IP \*hrfill remove newline in \fIcbs\fP and pad with blanks .br .ns .IP \*hlcase map alphabetics to lower case .br .ns .IP \*hucase map alphabetics to upper case .br .ns .IP \*hswab swap every pair of bytes .br .ns .IP \*hnoerror do not stop processing on an error .br .ns .IP \*hsync pad every input record to .I ibs .br .ns .IP "\*h... , ..." several comma-separated conversions .PP .fi Where sizes are specified, a number of bytes is expected. A number may end with .B "k, 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 if \fIascii\fP, \fIrtrim\fP, \fIebcdic\fP, or \fIrfill\fP conversion is specified. In the former two cases .I cbs characters are placed into the conversion buffer, converted to ASCII for case 1, and trailing blanks trimmed and new-line added before sending the line to the output. In the latter two cases ASCII characters are read into the conversion buffer, converted to EBCDIC for case 3, and blanks added to make up an output record of size \fIcbs\fP. Only one of these conversions or \fIibm\fP may be used at a time. .PP After completion, .I dd reports the number of whole and partial input and output blocks. .PP For example, to read an EBCDIC tape blocked ten 80-byte EBCDIC card images per record into the ASCII file .IR x : .IP "" dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase .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. .PP To skip over a file before copying from magnetic tape do: .IP"" (dd of=/dev/null; dd of=x)