Arguments to long options are mandatory for short options as well.
-h, --help
output the usage message then exit.
-H, --hex
output the response in hexadecimal to stdout. When used once the whole response is output in ASCII
hexadecimal, prefixed by an address (starting at 0) on each line. When used twice the whole
response is output in hexadecimal with no leading address (on each line).
Using this option three times will produce output that can be redirected to a file and later given
to another invocation using the --inhex=FN option.
-i, --inhex=FN
where FN is a file name whose contents are assumed to be ASCII hexadecimal. If DEVICE is also
given then DEVICE is ignored, a warning is issued and the utility continues, decoding the file
named FN. See the "HEX, BINARY AND JSON FORMATS" section in the sg3_utils manpage for more
information. If the --raw option is also given then the contents of FN are treated as binary.
-m, --maxlen=LEN
where LEN is the (maximum) response length in bytes. It is placed in the cdb's "allocation length"
field. If not given (or LEN is zero) then 8192 is used. The maximum allowed value of LEN is 65535.
-M, --media
sets the MEDIA bit in the cdb which causes the density codes (or medium types) supported by the
tape cartridge in the drive to be placed in the response. The default is to request the density
codes (or medium types) supported by the tape drive itself.
If there is no "medium" (e.g. tape cartridge) present in the drive the SCSI command will fail with
a "not ready" sense key.
-r, --raw
output the SCSI response (i.e. the data-out buffer) in binary (to stdout) unless the --inhex=FN
option is given.
When used together with the --inhex=FN option then the contents of FN are treated as binary
(rather than hexadecimal).
-R, --readonly
open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag). The default is to open it
read-write.
-t, --typem
sets the MEDIUM TYPE bit in the cdb which causes the medium types supported by the tape drive (or
tape cartridge) to be placed in the response. The default is to request the density codes.
-v, --verbose
increase the level of verbosity, (i.e. debug output).
-V, --version
print the version string and then exit.