sg_unmap --version (return code: 0)
version: 1.10 20160201
sg_unmap --help (return code: 0)
Usage: sg_unmap [--anchor] [--grpnum=GN] [--help] [--in=FILE]
[--lba=LBA,LBA...] [--num=NUM,NUM...] [--timeout=TO]
[--verbose] [--version] DEVICE
where:
--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=FILE|-I FILE read LBA, NUM pairs from FILE (if FILE is '-'
then stdin is read)
--lba=LBA,LBA...|-l LBA,LBA... LBA is the logical block address
to start NUM unmaps
--num=NUM,NUM...|-n NUM,NUM... NUM is number of logical blocks to
unmap starting at corresponding LBA
--timeout=TO|-t TO command timeout (unit: seconds) (def: 60)
--verbose|-v increase verbosity
--version|-V print version string and exit
Perform a SCSI UNMAP command. LBA, NUM and the values in FILE are assumed
to be decimal. Use '0x' prefix or 'h' suffix for hex values.
Example to unmap LBA 0x12345:
sg_unmap --lba=0x12345 --num=1 /dev/sdb