1DD(1)                       General Commands Manual                      DD(1)
2
3
4

NAME

6       dd - convert and copy a file
7

SYNOPSIS

9       dd [option=value] ...
10

DESCRIPTION

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 input files before terminating (makes sense  only
28                      where input is a magtape or similar device).
29       seek=n         seek  n  records  from  beginning  of output file before
30                      copying
31       count=n        copy only n input records
32       conv=ascii     convert EBCDIC to ASCII
33            ebcdic    convert ASCII to EBCDIC
34            ibm       slightly different map of ASCII to EBCDIC
35            block     convert variable length records to fixed length
36            unblock   convert fixed length records to variable length
37            lcase     map alphabetics to lower case
38            ucase     map alphabetics to upper case
39            swab      swap every pair of bytes
40            noerror   do not stop processing on an error
41            sync      pad every input record to ibs
42            ... , ... several comma-separated conversions
43
44       Where sizes are specified, a number of bytes is expected.  A number may
45       end with k, b or w to specify multiplication by 1024, 512, or 2 respec‐
46       tively; a pair of numbers may be separated by x to indicate a product.
47
48       Cbs is used only if ascii, unblock, ebcdic, ibm, or block conversion is
49       specified.   In the first two cases, cbs characters are placed into the
50       conversion buffer, any specified character mapping  is  done,  trailing
51       blanks  trimmed  and new-line added before sending the line to the out‐
52       put.  In the latter three cases, characters are read into  the  conver‐
53       sion buffer, and blanks added to make up an output record of size cbs.
54
55       After  completion, dd reports the number of whole and partial input and
56       output blocks.
57
58       For example, to read an EBCDIC tape blocked  ten  80-byte  EBCDIC  card
59       images per record into the ASCII file x:
60
61              dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase
62
63       Note the use of raw magtape.  Dd is especially suited to I/O on the raw
64       physical devices because it allows reading  and  writing  in  arbitrary
65       record sizes.
66

SEE ALSO

68       cp(1), tr(1)
69

DIAGNOSTICS

71       f+p records in(out): numbers of full and partial records read(written)
72

BUGS

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       One must specify ``conv=noerror,sync'' when copying raw disks with  bad
79       sectors to insure dd stays synchronized.
80
81       Certain combinations of arguments to conv= are permitted.  However, the
82       block or unblock option cannot be combined with ascii, ebcdic  or  ibm.
83       Invalid  combinations  silently ignore all but the last mutually-exclu‐
84       sive keyword.
85
86
87
884th Berkeley Distribution       April 29, 1985                           DD(1)
Impressum