Multiplier |
Meaning |
x<n> |
*<n> |
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 sg_dd |
default |
Brief
description |
append=0|1 |
0 |
append to output file (rather
than overwrite) |
blk_sgio=0|1 |
0 |
when set access devices via SCSI
commands (SG_IO ioctl) |
bpt |
128 or 32 |
blocks_per_transfer (granularity
of each IO). Default is 128 when bs < 2048 (bytes) else the default
is 32 |
cdbsz=6|10|12|16 |
10 or 16 |
cdb size of SCSI READ and/or
WRITE commands |
coe=0|1 |
0 |
continue_on_error when set |
dio=0|1 |
0 |
direct IO (only via sg device
nodes) |
fua=0|1|2|3 |
0 |
force_unit_access, 1->if,
2->of, 3->if+of |
odir=0|1 |
0 |
O_DIRECT flag on open() when set |
sync=0|1 |
0 |
SYNCHRONIZE CACHE SCSI command
after transfer when set |
time=0|1 |
0 |
when set print elapsed time and
throughput after copy |
verbose=<n> |
0 |
larger <n> is the greater
the debug output |
--version |
print the version number and
release date of
sg_dd then exit |
File
type |
open
[when input] |
open
[when output] |
IO
method |
Notes |
normal |
O_RDONLY |
O_WRONLY | O_CREAT [add O_APPEND if 'append=1'] |
Unix read() write() |
Add O_DIRECT if 'odir=1' |
stdin or stdout |
[do nothing] |
[do nothing] |
Unix read() write() |
|
/dev/null |
O_RDONLY | [do nothing] |
Unix read() if input |
if output then no IO |
block device |
O_RDONLY | O_WRONLY | O_CREAT [add O_APPEND if 'append=1'] |
Unix read() write() | Add O_DIRECT if 'odir=1' |
block device [blk_sgio=1] |
O_RDWR or O_RDONLY | O_RDWR | SCSI commands | Opens input O_RDONLY if O_RDWR fails. Adds O_DIRECT if 'odir=1' |
sg device |
O_RDWR or O_RDONLY |
O_RDWR |
SCSI commands |
Opens input O_RDONLY if O_RDWR fails |
raw device |
O_RDONLY | O_WRONLY |
Unix read() write() |
|
scsi tape device |
x |
x |
no IO |
error reported |
Return to main page.
Last updated: 8th August 2005