sg_write_same --version (return code: 0)
sg_write_same: version: 1.11 20151220
sg_write_same --help (return code: 0)
Usage: sg_write_same [--10] [--16] [--32] [--anchor] [--grpnum=GN] [--help]
[--in=IF] [--lba=LBA] [--lbdata] [--ndob] [--num=NUM]
[--pbdata] [--timeout=TO] [--unmap] [--verbose]
[--version] [--wrprotect=WRP] [xferlen=LEN]
DEVICE
where:
--10|-R do WRITE SAME(10) (even if '--unmap' is given)
--16|-S do WRITE SAME(16) (def: 10 unless '--unmap' given,
LBA+NUM > 32 bits, or NUM > 65535; then def 16)
--32|-T do WRITE SAME(32) (def: 10 or 16)
--anchor|-a set anchor field in cdb
--grpnum=GN|-g GN GN is group number field (def: 0)
--help|-h print out usage message
--in=IF|-i IF IF is file to fetch one block of data from (use LEN
bytes or whole file). Block written to DEVICE
--lba=LBA|-l LBA LBA is the logical block address to start (def: 0)
--lbdata|-L set LBDATA bit (obsolete)
--ndob|-N set 'no data-out buffer' bit
--num=NUM|-n NUM NUM is number of logical blocks to write (def: 1)
[Beware NUM==0 may mean rest of device]
--pbdata|-P set PBDATA bit (obsolete)
--timeout=TO|-t TO command timeout (unit: seconds) (def: 60)
--unmap|-U set UNMAP bit
--verbose|-v increase verbosity
--version|-V print version string then exit
--wrprotect=WPR|-w WPR WPR is the WRPROTECT field value (def: 0)
--xferlen=LEN|-x LEN LEN is number of bytes from IF to send to
DEVICE (def: IF file length)
Performs a SCSI WRITE SAME (10, 16 or 32) command