1DD(1) General Commands Manual DD(1)
2
3
4
6 dd - convert and copy a file
7
9 dd [option=value] ...
10
12 Dd copies the specified input file to the specified output with possi‐
13 ble conversions. The standard input and output are used by default.
14 The input and output block size may be specified to take advantage of
15 raw physical I/O.
16
17 option values
18 if= input file name; standard input is default
19 of= output file name; standard output is default
20 ibs=n input block size n bytes (default 512)
21 obs=n output block size (default 512)
22 bs=n set both input and output block size, superseding ibs
23 and obs; also, if no conversion is specified, it is par‐
24 ticularly efficient since no copy need be done
25 cbs=n conversion buffer size
26 skip=n skip n input records before starting copy
27 files=n copy n files from (tape) input
28 seek=n seek n records from beginning of output file before
29 copying
30 count=n copy only n input records
31 conv=ascii convert EBCDIC to ASCII
32 ebcdic convert ASCII to EBCDIC
33 ibm slightly different map of ASCII to EBCDIC
34 lcase map alphabetics to lower case
35 ucase map alphabetics to upper case
36 swab swap every pair of bytes
37 noerror do not stop processing on an error
38 sync pad every input record to ibs
39 ... , ... several comma-separated conversions
40
41 Where sizes are specified, a number of bytes is expected. A number may
42 end with k, b or w to specify multiplication by 1024, 512, or 2 respec‐
43 tively; a pair of numbers may be separated by x to indicate a product.
44
45 Cbs is used only if ascii or ebcdic conversion is specified. In the
46 former case cbs characters are placed into the conversion buffer, con‐
47 verted to ASCII, and trailing blanks trimmed and new-line added before
48 sending the line to the output. In the latter case ASCII characters
49 are read into the conversion buffer, converted to EBCDIC, and blanks
50 added to make up an output record of size cbs.
51
52 After completion, dd reports the number of whole and partial input and
53 output blocks.
54
55 For example, to read an EBCDIC tape blocked ten 80-byte EBCDIC card
56 images per record into the ASCII file x:
57
58 dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase
59
60 Note the use of raw magtape. Dd is especially suited to I/O on the raw
61 physical devices because it allows reading and writing in arbitrary
62 record sizes.
63
64 To skip over a file before copying from magnetic tape do (dd
65 of=/dev/null; dd of=x) </dev/rmt0
66
68 cp(1), tr(1)
69
71 f+p records in(out): numbers of full and partial records read(written)
72
74 The ASCII/EBCDIC conversion tables are taken from the 256 character
75 standard in the CACM Nov, 1968. The `ibm' conversion, while less
76 blessed as a standard, corresponds better to certain IBM print train
77 conventions. There is no universal solution.
78
79 Newlines are inserted only on conversion to ASCII; padding is done only
80 on conversion to EBCDIC. These should be separate options.
81
82
83
84 DD(1)