sg_write_buffer --version (return code: 0)
sg_write_buffer: version: 1.21 20151219
sg_write_buffer --help (return code: 0)
Usage: sg_write_buffer [--bpw=CS] [--help] [--id=ID] [--in=FILE]
[--length=LEN] [--mode=MO] [--offset=OFF] [--raw]
[--skip=SKIP] [--specific=MS] [--timeout=TO]
[--verbose] [--version] DEVICE
where:
--bpw=CS|-b CS CS is chunk size: bytes per write buffer
command (def: 0 -> as many as possible)
--help|-h print out usage message then exit
--id=ID|-i ID buffer identifier (0 (default) to 255)
--in=FILE|-I FILE read from FILE ('-I -' read from stdin)
--length=LEN|-l LEN length in bytes to write; may be deduced from
FILE
--mode=MO|-m MO write buffer mode, MO is number or acronym
(def: 0 -> 'combined header and data' (obs))
--offset=OFF|-o OFF buffer offset (unit: bytes, def: 0)
--raw|-r read from stdin (same as '-I -')
--skip=SKIP|-s SKIP bytes in file FILE to skip before reading
--specific=MS|-S MS mode specific value; 3 bit field (0 to 7)
--timeout=TO|-t TO command timeout in seconds (def: 300)
--verbose|-v increase verbosity
--version|-V print version string and exit
Performs one or more SCSI WRITE BUFFER commands. Use '-m xxx' to list
available modes. A chunk size of 4 KB ('--bpw=4k') seems to work well.
Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3