sg_read_attr --version (return code: 0)
version: 1.00 20160207
sg_read_attr --help (return code: 0)
Usage: sg_read_attr [--cache] [--element=EA] [--enumerate] [--filter=FL]
[--first=FAI] [--help] [--hex] [--in=FN] [--lvn-LVN]
[--maxlen=LEN] [--partition=PN] [--quiet] [--raw]
[--readonly] [--sa=SA] [--verbose] [--version]
DEVICE
where:
--cache|-c set CACHE bit in cdn (def: clear)
--enumerate|-e enumerate known attributes and service actions
--element=EA|-E EA EA is placed in 'element address' field in
cdb [SMC-3] (def: 0)
--filter=FL|-f FL FL is parameter code to match (def: -1 -> all)
--first=FAI|-F FAI FAI is placed in 'first attribute identifier'
field in cdb (def: 0)
--help|-h print out usage message
--hex|-H output response in hexadecimal; used twice
shows decoded values in hex
--in=FN|-i FN FN is a filename containing attribute values in
ASCII hex or binary if --raw also given
--lvn=LVN|-l LVN logical volume number (LVN) (def:0)
--maxlen=LEN|-m LEN max response length (allocation length in cdb)
(def: 0 -> 8192 bytes)
--partition=PN|-p PN partition number (PN) (def:0)
--quiet|-q reduce the amount of output, can use more than once
--raw|-r output response in binary
--readonly|-R open DEVICE read-only (def: read-write)
--sa=SA|-s SA SA is service action (def: 0)
--verbose|-v increase verbosity
--version|-V print version string and exit
Performs a SCSI READ ATTRIBUTE command. It is typically used on tape
systems.