Usage: sg_write_same [--10] [--16] [--32] [--anchor] [--ff] [--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 send WRITE SAME(10) (even if '--unmap' is given) --16|-S send WRITE SAME(16) (def: 10 unless '--unmap' given, LBA+NUM > 32 bits, or NUM > 65535; then def 16) --32|-T send WRITE SAME(32) (def: 10 or 16) --anchor|-a set ANCHOR field in cdb --ff|-f use buffer of 0xff bytes for fill (def: 0x0 bytes) --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 NDOB (no data-out buffer) bit in cdb --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 in cdb --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. NDOB bit is only supported by the 16 and 32 byte variants. When set the specified blocks will be filled with zeros or the 'provisioning initialization pattern' as indicated by the LBPRZ field. As a precaution one of the '--in=', '--lba=' or '--num=' options is required. Another implementation of WRITE SAME is found in the sg_write_x utility.