| Basic
dd
option |
dd
default |
ddpt
default |
Brief
description |
| bs=BS |
IBS,
OBS or 512 |
IBS,
OBS or 512 |
Number of bytes in each input and output block. Sets IBS and OBS. |
| count=COUNT | blocks in IFILE |
blocks in IFILE |
Number of input blocks to copy. |
| if=IFILE | stdin |
[none] |
file (or device) to read from. |
| of=OFILE | stdout |
/dev/null | file (or device) to write to. |
| dd
option |
Brief
description [default for both dd and ddpt shown where applicable] |
| cbs=CBS |
ddpt accepts but ignores this dd
option ("conversion block size") |
| conv=CONV |
see section on Conversions below |
| ibs=IBS | number of bytes in each block of
IFILE (default: 512) |
| iflag=FLAGS |
similar
to option found in recent GNU dd versions, see below |
| obs=OBS | number of bytes in each block of
OFILE (default: 512) |
| oflag=FLAGS |
similar
to option found in recent GNU dd versions, see below |
| seek=SEEK | block number in OFILE to commence writing (default:
0) |
| skip=SKIP | block number in IFILE to commence reading (default: 0) |
| stat=STAT |
accepts 'noxfer' to suppress
timing and throughput information |
| --help |
print usage message then exit.
'-h' option is equivalent. |
| --version |
print version number and release
date then exit. '-V' option is equivalent. |
| Multiplier |
Meaning
multiply
associated
number
by |
| x<n> |
<n> [e.g.
'2x512' yields 1024] |
| c |
1 |
| w |
2 |
| b |
512 |
| k K KiB |
1024 |
| KB |
1000 |
| m M MiB |
1048576 |
| MB |
1000000 |
| g G GiB |
2**30 |
| GB |
10**9 |
| t T TiB |
2**40 |
| TB |
10**12 |
| extra
options
in
ddpt |
default |
Brief
description |
| bpt=BPT |
varies, 128 when IBS=512 |
Blocks Per Transfer (BPT) is the number of input blocks
per transfer
(granularity
of each IO) read into the copy buffer. Default varies between 8192 and
1 depending on IBS. If BPT is given as zero, it is changed
to the default value. See below this table. |
| bpt=BPT,OBPC |
OBPC=0 |
Output Blocks Per Check (OBPC)
controls the granularity of sparse write, write sparing and trim
checks.
Default (0) is equivalent to OBPC=(BPT*IBS)/OBS. If the given OBPC exceeds (BPT*IBS)/OBS
then it is scaled back to that value. |
| cdbsz=6
|
10
|
12
|
16 |
10 or 16 |
cdb size of SCSI READ and/or
WRITE commands. Only applicable to pt devices. Defaults to 10 byte cdb
unless
the largest address exceeds 32 bits or BPT exceeds 16 bits. In either
case a 16 cdb is used. |
| coe=0
|
1 |
0 |
when non-zero,
continue_on_error. May use iflag=coe
and/or oflag=coe
instead. See section on continue on error. |
| coe_limit=CL |
0 |
number of consecutive "bad"
block errors allowed when reading and 'coe > 0'. Default of 0 is
interpreted as no limit. See section on continue on
error. |
| of2=OFILE2 |
/dev/null |
second output file. Cannot be pt
device. |
| retries=RETR |
0 |
number of times to retry an
error on a pt device READ or WRITE command |
| verbose=VERB |
0 |
the larger VERB is then the greater
the debug output. 1 and 2 print the cdbs for setup commands; 3 and 4
print the cdbs for all commands |
| --verbose |
equivalent to 'verbose=1'. If
used twice equivalent to 'verbose=2'. May be shortened to '-v' or
'-vv'. |
|
| --wscan |
Windows only. Lists storage
devices and associated volumes then exits. Other options ignored. |
| FLAG |
filetype: pt, blk or reg |
iflag
or oflag |
comments |
| append |
reg |
oflag |
use O_APPEND open flag.
Conflicts with 'seek=SEEK'
when "SEEK > 0". Pointless
on block device, may cause open error |
| coe |
all |
iflag, both for pt |
See section on continue on error. |
| direct |
blk, reg |
both |
use O_DIRECT open flag. Bypass
block layer's buffering. |
| dpo |
pt |
both | "disable page out" set for READ and/or WRITE SCSI commands |
| excl |
all |
both |
Use O_EXCL open flag |
| errblk |
pt |
iflag |
writes LBAs of bad blocks
(medium errors) to errblk.txt
file. One LBA per line, in hex, preceded by 0x. |
| fdatasync |
blk,reg |
oflag |
flush OFILE's data to storage at end of copy. Ignored
if oflag=direct also given. |
| force |
pt |
both |
override objections and warnings
from sanity checking (e.g. discrepancy between IBS or OBS and the block size in the SCSI
READ CAPACITY command response) |
| fsync |
blk,reg |
oflag |
flush OFILE's data and metadata to storage at end of copy. Ignored if oflag=direct also given. |
| fua |
pt |
both |
"force unit access" set for READ
and/or WRITE SCSI commands |
| fua_nv |
pt |
both |
"force unit access non-volatile
cache" set for READ and/or WRITE SCSI commands |
| nocache |
blk, reg |
both |
Use
posix_fadvise(POSIX_FADV_DONTNEED) to suggest minimal use of file
buffers (kernel
cache) associated with files being copied. |
| norcap |
pt |
both |
do not perform SCSI READ CAPACITY command |
| nowrite |
all |
oflag |
bypass writes to OFILE. Other commands (e.g. related to trim) are sent to OFILE. The "records out" count is not incremented. See section on trim and unmap . |
| null |
all |
both |
this flag is just a place holder |
| pt |
blk |
both |
access block device via SCSI
pass-through mechanism. Has no effect on pt device. |
| resume |
reg |
oflag |
if copy interrupted add 'resume'
to oflag to restart copy |
| self |
pt |
both |
specify self trim when used
together with trim. Can appear as iflag or oflag but applies to OFILE which needs to be a pt device |
| sparing |
all | oflag | don't write output buffers if
reading the OFILE indicates
the data compares equal. See section on write
sparing
. |
| sparse |
all |
oflag |
don't write output buffers that
are full of zeros. The last segment of a regular OFILE is written
except when the sparse argument is given twice. See section on sparse writes
. |
| ssync |
pt |
oflag |
send SCSI SYNCHRONIZE CACHE
command to OFILE after copy |
| strunc |
reg |
oflag |
variant of oflag=sparse in which
ftruncate() system call is used to extend OFILE if necessary |
| sync |
all |
both |
use O_SYNC open flag, probably
ignored on pt devices |
| trim |
pt |
oflag [iflag] |
similar functionality to sparse. Sends TRIM (UNMAP or WRITE SAME) command when zeros found. See section on trim and unmap . |
| trunc |
reg |
oflag |
truncate the OFILE prior to
starting the copy. If SEEK is
not given or 0, truncate to zero length; else truncate to the length
implied by SEEK. The default
action of ddpt is to not truncate the OFILE
(the opposite of what the dd
command does). |
| unmap |
pt |
oflag |
See trim |
| CONV |
filetype: pt, blk or reg |
comments |
| fdatasync |
blk,reg |
see fdatasync flag |
| fsync |
blk,reg |
see fsync flag |
| noerror |
all |
IO error does not stop copy.
dd's 'conv=noerror,sync' maps to ddpt's 'iflag=coe'. See the coe flag |
| null |
all |
this conversion is just a place holder |
| resume |
reg |
see the resume flag |
| sparing |
all |
see the sparing flag |
| sparse |
all |
see the sparse flag |
| sync |
all |
this conversion is accepted and
ignored. |
| trunc |
reg |
see the trunc flag |
| File
type |
open
IFILE |
open
OFILE |
IO
method |
Notes |
| regular |
O_RDONLY |
O_WRONLY | O_CREAT |
Unix read() write() |
N.B. A regular output file is
overwritten (not truncated). |
| stdin or stdout |
[do nothing] |
[do nothing] |
Unix read() write() |
hence open() flags have no
effect (e.g. 'oflag=direct' is ignored) |
| /dev/null or . (period) |
O_RDONLY | [do nothing] |
Unix read() if input |
if output file then nothing is
written |
| block device |
O_RDONLY | O_WRONLY | O_CREAT |
Unix read() write() | Windows uses a device specific
IO method |
| pt device |
O_RDWR or O_RDONLY |
O_RDWR |
SCSI commands |
Opens input O_RDONLY if O_RDWR fails |
| ddpt version release date |
tarball Windows exe |
i386 rpm binary |
debian
package |
| 0.91 20100922 |
ddpt-0.91.tgz ddpt-0.91.tar.bz2 ddpt.exe |
ddpt-0.91-1.i386.rpm |
ddpt_0.91-0.1_i386.deb |
| 0.92 20110217 |
ddpt-0.92.tgz ddpt-0.92.tar.gz ddpt-0.92.tar.bz2 ddpt.exe |
ddpt-0.92-1.i386.rpm | ddpt_0.92-0.1_i386.deb |
Return to main page.
Last updated: 17th February 2011