|
|
1.1 root 1: .TH DD 1
2: .SH NAME
3: dd \- convert and copy a file
4: .SH SYNOPSIS
5: .B dd
6: [
7: .I option value
8: ]
9: \&...
10: .SH DESCRIPTION
11: .I Dd\^
12: copies the specified input file
13: to the specified output with
14: possible conversions.
15: The standard input and output are used by default.
16: The input and output block size may be
17: specified to take advantage of raw physical I/O.
18: The options are
19: .TP \w'\fLoseek\ \ \fIn'u
20: .BI -if\ f
21: Open file
22: .I f
23: for input.
24: .TP
25: .BI -of\ f
26: Open file
27: .I f
28: for output.
29: .TP
30: .BI -ibs\ n\^
31: Set input block size to
32: .I n\^
33: bytes (default 512).
34: .TP
35: .BI -obs\ n\^
36: Set output block size (default 512).
37: .TP
38: .BI -bs\ n\^
39: Set both input and output block size,
40: superseding
41: .I ibs\^
42: and
43: .IR obs .
44: If no conversion is specified,
45: preserve the input block size instead of packing short blocks
46: into the output buffer.
47: This is particularly efficient since no in-core copy need be done.
48: .TP
49: .BI -cbs\ n\^
50: Set conversion buffer size.
51: .TP
52: .BI -skip\ n\^
53: Skip
54: .I n
55: input records before copying.
56: .TP
57: .BI -iseek\ n\^
58: Seek
59: .I n
60: records forward on input file
61: before copying.
62: .TP
63: .BI -files\ n\^
64: Catenate
65: .I n
66: input files (useful only for magnetic tape or similar input device).
67: .TP
68: .BI -oseek\ n\^
69: Seek
70: .I n\^
71: records from beginning of output file before copying.
72: .TP
73: .BI -count\ n\^
74: Copy only
75: .I n
76: input records.
77: .HP
78: \fL-conv\ ascii\ \ \ \ \fRConvert
79: .SM EBCDIC
80: to
81: .SM ASCII.
82: .PD0
83: .RS "\w'\fLconv\ \fP'u"
84: .TP "\w'\fLunblock\ \ \fP'u"
85: .B ebcdic
86: Convert
87: .SM ASCII
88: to
89: .SM EBCDIC.
90: .TP
91: .B ibm
92: Like
93: .B ebcdic
94: but with a slightly different character map.
95: .TP
96: .B block
97: Convert variable length
98: .SM ASCII
99: records to fixed length.
100: .TP
101: .B unblock
102: Convert fixed length
103: .SM ASCII
104: records to variable length.
105: .TP
106: .B lcase
107: Map alphabetics to lower case.
108: .TP
109: .B ucase
110: Map alphabetics to upper case.
111: .TP
112: .B swab
113: Swap every pair of bytes.
114: .TP
115: .B noerror
116: Do not stop processing on an error.
117: .TP
118: .B sync
119: Pad every input record to
120: .I ibs\^
121: bytes.
122: .RE
123: .PD
124: .PP
125: .fi
126: Where sizes are specified,
127: a number of bytes is expected.
128: A number may end with
129: .L k
130: or
131: .LR b
132: to specify multiplication by
133: 1024 or 512 respectively;
134: a pair of numbers may be separated by
135: .L x
136: to indicate a product.
137: Multiple conversions may be specified in the style:
138: .LR "-conv ebcdic,ucase" .
139: .PP
140: .L Cbs\^
141: is used only if
142: .LR ascii\^ ,
143: .LR unblock\^ ,
144: .LR ebcdic\^ ,
145: .LR ibm\^ ,
146: or
147: .L block\^
148: conversion is specified.
149: In the first two cases,
150: .I n
151: characters are copied into the conversion buffer, any specified
152: character mapping is done,
153: trailing blanks are trimmed and new-line is added
154: before sending the line to the output.
155: In the latter three cases, characters are read into the
156: conversion buffer and blanks are added to make up an
157: output record of size
158: .IR n .
159: If
160: .L cbs\^
161: is unspecified or zero, the
162: .LR ascii\^ ,
163: .LR ebcdic\^ ,
164: and
165: .L ibm\^
166: options convert the character set without changing the block
167: structure of the input file; the
168: .L unblock\^
169: and
170: .L block\^
171: options become a simple file copy.
172: .SH SOURCE
173: .B /sys/src/cmd/dd.c
174: .SH "SEE ALSO"
175: .IR cp (1)
176: .SH DIAGNOSTICS
177: .I Dd
178: reports the number of full + partial input and output
179: blocks handled.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.