sg_dd --version (return code: 0)
sg_dd: 5.86 20151219
sg_dd --help (return code: 0)
Usage: sg_dd [bs=BS] [count=COUNT] [ibs=BS] [if=IFILE] [iflag=FLAGS]
[obs=BS] [of=OFILE] [oflag=FLAGS] [seek=SEEK] [skip=SKIP]
[--help] [--version]
[blk_sgio=0|1] [bpt=BPT] [cdbsz=6|10|12|16] [coe=0|1|2|3]
[coe_limit=CL] [dio=0|1] [odir=0|1] [of2=OFILE2] [retries=RETR]
[sync=0|1] [time=0|1] [verbose=VERB]
where:
blk_sgio 0->block device use normal I/O(def), 1->use SG_IO
bpt is blocks_per_transfer (default is 128 or 32 when BS>=2048)
bs block size (default is 512)
cdbsz size of SCSI READ or WRITE cdb (default is 10)
coe 0->exit on error (def), 1->continue on sg error (zero
fill), 2->also try read_long on unrecovered reads,
3->and set the CORRCT bit on the read long
coe_limit limit consecutive 'bad' blocks on reads to CL times
when COE>1 (default: 0 which is no limit)
count number of blocks to copy (def: device size)
dio for direct IO, 1->attempt, 0->indirect IO (def)
ibs input block size (if given must be same as 'bs=')
if file or device to read from (def: stdin)
iflag comma separated list from: [coe,dio,direct,dpo,dsync,excl,
flock,fua,nocache,null,sgio]
obs output block size (if given must be same as 'bs=')
odir 1->use O_DIRECT when opening block dev, 0->don't(def)
of file or device to write to (def: stdout), OFILE of '.'
treated as /dev/null
of2 additional output file (def: /dev/null), OFILE2 should be
normal file or pipe
oflag comma separated list from: [append,coe,dio,direct,dpo,
dsync,excl,flock,fua,nocache,null,sgio,sparse]
retries retry sgio errors RETR times (def: 0)
seek block position to start writing to OFILE
skip block position to start reading from IFILE
sync 0->no sync(def), 1->SYNCHRONIZE CACHE on OFILE after copy
time 0->no timing(def), 1->time plus calculate throughput
verbose 0->quiet(def), 1->some noise, 2->more noise, etc
--help print out this usage message then exit
--version print version information then exit
copy from IFILE to OFILE, similar to dd command; specialized for SCSI devices