sg_compare_and_write --version (return code: 0)
sg_compare_and_write: version: 1.14 20160121
sg_compare_and_write --help (return code: 0)
Usage: sg_compare_and_write [--dpo] [--fua] [--fua_nv] [--group=GN] [--help]
--in=IF [--inw=WF] --lba=LBA [--num=NUM]
[--quiet] [--timeout=TO] [--verbose] [--version]
[--wrpotect=WP] [--xferlen=LEN] DEVICE
where:
--dpo|-d set the dpo bit in cdb (def: clear)
--fua|-f set the fua bit in cdb (def: clear)
--fua_nv|-F set the fua_nv bit in cdb (def: clear)
--group=GN|-g GN GN is GROUP NUMBER to set in cdb (def: 0)
--help|-h print out usage message
--in=IF|-i IF IF is a file containing a compare buffer and
optionally a write buffer (when --inw=WF is
not given)
--inw=WF|-D WF WF is a file containing a write buffer
--lba=LBA|-l LBA LBA of the first block to compare and write
--num=NUM|-n NUM number of blocks to compare/write (def: 1)
--quiet|-q suppress MISCOMPARE report to stderr,
still sets exit status of 14
--timeout=TO|-t TO timeout for the command (def: 60 secs)
--verbose|-v increase verbosity (use '-vv' for more)
--version|-V print version string then exit
--wrprotect=WP|-w WP write protect information (def: 0)
--xferlen=LEN|-x LEN number of bytes to transfer. Default is
(2 * NUM * 512) or 1024 when NUM is 1
Performs a SCSI COMPARE AND WRITE operation.