NAME
dd – convert and copy a file |
SYNOPSIS
dd [ option value ] ... |
DESCRIPTION
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. The options are –if f Open file f for input. –of f Open file f for output. –ibs n Set input block size to n bytes (default 512). –obs n Set output block size (default 512). –bs n Set both input and output block size, superseding ibs and obs. If no conversion is specified, preserve the input block size instead of packing short blocks into the output buffer. This is particularly efficient since no in–core copy need be done. –cbs n Set conversion buffer size. –skip n Skip n input blocks before copying. –iseek n Seek n blocks forward on input file before copying. –iseekb nSeek n bytes forward on input file before copying. –files n Catenate n input files (useful only for magnetic tape or similar input device). –oseek n Seek n blocks from beginning of output file before copying. –oseekb nSeek n bytes from beginning of output file before copying. –count n Copy only n input blocks. –trunc n If n is 0, open the output file without truncating it. –quiet n If n is 1, omit the summary of blocks transferred. –conv ascii Convert EBCDIC to ASCII.
Cbs is used only if ascii, unblock, ebcdic, ibm, or block conversion
is specified. In the first two cases, n characters are copied
into the conversion buffer, any specified character mapping is
done, trailing blanks are trimmed and new–line is added before
sending the line to the output. In the latter three
cases, characters are read into the conversion buffer and blanks
are added to make up an output block of size n. If cbs is unspecified
or zero, the ascii, ebcdic, and ibm options convert the character
set without changing the block structure of the input file; the
unblock and block options become a simple file
copy. |
SOURCE
/sys/src/cmd/dd.c |
SEE ALSO
cp(1) |
DIAGNOSTICS
Dd reports the number of full + partial input and output blocks
handled. |