OS Manuals

/usr/bin/sg_rep_zones

SCSI utilities for Linux, Unix and Windows

From sg3-utils 1.49-r3 (enterprise-packages), captured 2026-11-08 by running sg_rep_zones --help (exit 0). permalink

Usage: sg_rep_zones  [--domain] [--find=ZT] [--force] [--help] [--hex]
                     [--inhex=FN] [--json[=JO]] [--js_file=JFN]
                     [--locator=LBA] [--maxlen=LEN] [--num=NUM]
                     [--partial] [--raw] [--readonly][--realm]
                     [--report=OPT] [--start=LBA] [--statistics]
                     [--verbose] [--version] [--wp] DEVICE
  where:
    --domain|-d        sends a REPORT ZONE DOMAINS command
    --find=ZT|-F ZT    find first zone with ZT zone type, starting at LBA
                       if first character of ZT is - or !, find first
                       zone that is not ZT
    --force|-f         bypass some sanity checks when decoding response
    --help|-h          print out usage message, use twice for more help
    --hex|-H           output response in hexadecimal; used twice
                       shows decoded values in hex
    --inhex=FN|-i FN    decode contents of FN, ignore DEVICE
    --json[=JO]|-j[=JO]    output in JSON instead of plain text
                           Use --json=? for JSON help
    --js-file=JFN|-J JFN    JFN is a filename to which JSON output is
                            written (def: stdout); truncates then writes
    --locator=LBA|-l LBA    similar to --start= option
    --maxlen=LEN|-m LEN    max response length (allocation length in cdb)
                           (def: 0 -> 8192 bytes)
    --num=NUM|-n NUM    number of zones to output (def: 0 -> all)
    --partial|-p       sets PARTIAL bit in cdb (def: 0 -> zone list
                       length not altered by allocation length in cdb)
    --raw|-r           output response in binary
    --readonly|-R      open DEVICE read-only (def: read-write)
    --realm|-e         sends a REPORT REALMS command
    --report=OPT|-o OP    reporting options (def: 0: all zones)
    --start=LBA|-s LBA    report zones from the LBA (def: 0)
                          need not be a zone starting LBA
    --statistics|-S    gather statistics by reviewing zones
    --verbose|-v       increase verbosity
    --version|-V       print version string and exit
    --wp|-w            output write pointer only

Sends a SCSI REPORT ZONES, REPORT ZONE DOMAINS or REPORT REALMS command.
By default sends a REPORT ZONES command. Give help option twice
(e.g. '-hh') to see reporting options enumerated.
Options (22)
OptionDescriptionSource
--find, -F ZT|-Ffind first zone with ZT zone type, starting at LBA if first character of ZT is - or !, find first zone that is not ZThelp + man
--inhex, -i FN|-iwhere FN is a file name whose contents are assumed to be ASCII hexadecimal.help + man
--json JO]|-j[=JOoutput in JSON instead of plain text Use --json=? for JSON helphelp
--js-file, -J JFN|-JJFN is a filename to which JSON output is written (def: stdout);help + man
--locator, -l LBA|-lwhere LBA plays a similar role as it does in --start=LBA.help + man
--maxlen, -m LEN|-mmax response length (allocation length in cdb) (def: 0 -> 8192 bytes)help + man
--num, -n NUM|-nwhere NUM is the (maximum) number of zone descriptors to print out.help + man
--report, -o OPT|-owhere OPT will become the contents of the REPORTING OPTION field in the cdb.help + man
--start, -s LBA|-sreport zones from the LBA (def: 0) need not be a zone starting LBAhelp + man
-b, --briefeven though a ZBC disk will typically limit the size of the response to the REPORT ZONES command (e.g. due to the "allocation length" field), this may still be potentially a lot of output. (in the manual page but not in --help)man
-d, --domainsend or decode the SCSI REPORT ZONE DOMAINS command. (in the manual page but not in --help)man
-f, --forcewhen decoding the response to this command, certain sanity checks are done and if they fail a message is sent to stderr and a non-zero exit status is set. (in the manual page but not in --help)man
-h, --helpoutput the usage message then exit. (in the manual page but not in --help)man
-H, --hexoutput the response in hexadecimal to stdout. (in the manual page but not in --help)man
-p, --partialset the PARTIAL bit in the cdb. (in the manual page but not in --help)man
-r, --rawoutput response in binary (to stdout) unless the --inhex=FN option is also given. (in the manual page but not in --help)man
-R, --readonlyopen the DEVICE read-only (e.g. in Unix with the O_RDONLY flag). (in the manual page but not in --help)man
-e, --realmsend or decode the SCSI REPORT REALMS command. (in the manual page but not in --help)man
-S, --statisticsreviews all or a limited number of report zones, collects statistics and prints them (on stdout). (in the manual page but not in --help)man
-v, --verboseincrease the level of verbosity, (i.e. debug output). (in the manual page but not in --help)man
-V, --versionprint the version string and then exit. (in the manual page but not in --help)man
-w, --wpprint the write pointer (in hex) only. (in the manual page but not in --help)man
Exit status (1) from the manual page
0it is successful

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.