dd.1
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 207 行
1
207 行
.\" SCCSID: @(#)dd.1 4.1 12/9/88.TH dd 1 .SH Namedd \- copy and convert data.SH Syntax.B dd[\|\fIoption = value...\fR\|] .SH Description.NXB "dd command".NXR "file" "converting"The .PN ddcommand copies an input fileto an output withany requested conversions. The.PN ddcommand is especially suited to I/O on the raw physicaldevices because it allows reading and writing in arbitraryrecord sizes..PP After completion,.PN ddreports the number of whole and partial input andoutput blocks..PPThis utility supports EOT handling which allows the use ofmultiple media. The utility prompts for the next volume when itencounters the end of the current volume..SH Options.NXB "dd command" "options"Where sizes (\fIn\fR) are given for an option, the number may endwith \fBk\fR for kilobytes (1024 bytes), \fBb\fR forblocks (512 bytes), or \fBw\fR for words (2 bytes).Also, two numbers may be separated by the character x toindicate a product..IP \fBif=\fIname\fR 20Input file name. The standard input is the default..IP \fBof=\fIname\fR 20Output file name. The standard output is the default..IP \fBibs=\fIn\fR 20Input block size,.I nbytes. The default is 512 bytes.Some devices do not support greater than 65,535 bytes..IP \fBobs=\fIn\fR 20Output block size,.I nbytes. The default is 512 bytes.Some devices do not support greater than 65,535 bytes..IP \fBbs=\fIn\fR 20Set both input and output block size to \fIn\fR bytes,superseding.B ibsand.BR obs .Also, if \fBbs\fR is specified,the copy is more efficient, since no blocking conversion isnecessary..IP \fBcbs=\fIn\fR 20Conversion buffer size, \fIn\fR bytes. Use only if.BR ascii ,.BR unblock ,.BR ebcdic ,.BR ibm ,or.B blockconversion is specified. For.B asciiand.BR unblock , \fIn\fR characters are placed into the conversionbuffer, any specified character mapping is done, trailing blanks are trimmedand new line added before sending the line to the output. For.BR ebcdic ,.BR ibm ,or.BR block ,characters are read into the conversion buffer, and blanks added to makean output record of size \fIn\fR bytes..IP \fBskip=\fIn\fR 20Skip.I n input records before starting to copy..IP \fBfiles=\fIn\fR 20Copy.I ninput files before terminating. This option is useful onlywhen the input is a magnetic tape or similar device..IP \fBseek=\fIn\fR 20Seek.I nrecords from beginning of output file before copying..IP \fBrbuf=\fIn\fR 20Use.I nbuffers for reading from those raw devices that supportn-buffered I/O. (See Section 4 to check whether aspecific device supports n-buffered I/O.) All .I n reads are started and each read must complete before thedata can be used. This allows an n-buffered read-aheadon supported raw devices..IP "" 20A default of eight read buffers are used if the readdevice supports n-buffered I/O and the write devicedoes not..IP "" 20The \fBrbuf\fR option cannotbe used with the \fBwbuf\fR option..IP \fBwbuf=\fIn\fR 20Use.I nbuffers for writing from those raw devices that supportn-buffered I/O. (See Section 4 to check whether aspecific device supports n-buffered I/O.)Each write is started but not knownto be complete until all .I nbuffers have been used. (This allows an n-bufferedwrite-behind on supported raw devices). .IP "" 20A default of eight write buffers are used if the writedevice supports n-buffered I/O..IP "" 20The \fBwbuf\fRoption cannot be used with the \fBrbuf\fR option..IP \fBcount=\fIn\fR 20Copy only.I n input records..IP \fBconv=ascii\fR 20Convert EBCDIC to ASCII..IP \fBconv=ebcdic\fR 20Convert ASCII to EBCDIC..IP \fBconv=ibm\fR 20Slightly different map of ASCII to EBCDIC (see RESTRICTIONS). .IP \fBconv=block\fR 20 Convert variable length records to fixed length. .IP \fBconv=unblock\fR 20Convert fixed length records to variable length..IP \fBconv=lcase\fR 20Map alphabetics to lower case..IP \fBconv=ucase\fR 20Map alphabetics to upper case..IP \fBconv=swab\fR 20Swap every pair of bytes..IP \fBconv=noerror\fR 20Do not stop processing on an error..IP \fBconv=sync\fR 20Pad every input record to.IR ibs ..IP \fBconv=nomulti\fR 20Disable multiple tape volumes..IP \fBconv=sparse\fR 20Create a sparse output file..IP "\fBconv=... , ...\fR" 20Include several arguments for the \fBconv\fR option, separatedby commas (see example below)..NXE "dd command" "options".SH Examples.NXR "dd command" "example"The following example shows how to readan EBCDIC tape blocked ten 80-byteEBCDIC card images per record into the ASCII file.I x:.EXdd if=/dev/rmt0h of=x ibs=800 cbs=80 conv=ascii,lcase.EE.PPNote the use of raw magtape.As noted in the DESCRIPTION, the.PN ddcommand is especially suited to I/O on the rawphysical devices because it allows readingand writing in arbitrary record sizes..SH Restrictions.NXR "dd command" "restricted"The ASCII/EBCDIC conversion tables aretakenfrom the 256-character standard inthe .ICommunications of the ACM, .RNovember, 1968..PPThe \fBibm\fR conversioncorresponds to certain IBM print train conventions..PPOne must specify ``conv=noerror,sync'' when copyingraw disks with bad sectors to ensure that.I ddstays synchronized..brOn SCSI tape devices when reading a multi-volume tape set the commandwill exit normally upon hitting EOT on any volume rather thanautomatically unloading the volume and prompting for the next volumeas is normal. The user should load the next volume and issue the commandanew..SH Diagnostics.NXR "dd command" "diagnostics"f+p records in(out): numbers of full and partial records read(written).SH See Alsocp(1), tr(1), nbuf(4).NXE "dd command"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?