sg_raw --version (return code: 0)
sg_raw 0.4.14 (2015-12-19)
Copyright (C) 2007-2012 Ingo van Lil <inguin@gmx.de>
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
sg_raw --help (return code: 0)
Usage: sg_raw [OPTION]* DEVICE CDB0 CDB1 ...
Options:
-b, --binary Dump data in binary form, even when writing to stdout
-h, --help Show this message and exit
-i, --infile=IFILE Read data to send from IFILE (default: stdin)
-k, --skip=LEN Skip the first LEN bytes when reading data to send
-n, --nosense Don't display sense information
-o, --outfile=OFILE Write binary data to OFILE (def: hexdump to stdout)
-r, --request=RLEN Request up to RLEN bytes of data (data-in)
-R, --readonly Open DEVICE read-only (default: read-write)
-s, --send=SLEN Send SLEN bytes of data (data-out)
-t, --timeout=SEC Timeout in seconds (default: 20)
-v, --verbose Increase verbosity
-V, --version Show version information and exit
Between 6 and 256 command bytes (two hex digits each) can be specified
and will be sent to DEVICE. Lengths RLEN and SLEN are decimal by
default. Bidirectional commands accepted.
Simple example: Perform INQUIRY on /dev/sg0:
sg_raw -r 1k /dev/sg0 12 00 00 00 60 00