OS Manuals

/usr/bin/sg_rep_density

SCSI utilities for Linux, Unix and Windows

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

Usage: sg_rep_density  [--help] [--hex] [--inhex=FN] [--maxlen=LEN] [--media]
                   [--raw] [--readonly] [--typem] [--verbose] [--version]
                   DEVICE
  where:
    --help|-h          prints out this usage message
    --hex|-H           output response in hexadecimal (default); used
                       twice: hex without addresses at start of line
    --inhex=FN         decode contents of FN, ignore DEVICE
    --maxlen=LEN|-m LEN    max response length (allocation length in cdb)
                           (def: 512 bytes)
    --media|-M         report on media in drive (def: report on drive)
    --raw|-r           output response in binary
    --readonly|-R      open DEVICE read-only (def: read-write)
    --typem|-t         report medium types (def: density codes)
    --verbose|-v       increase verbosity
    --version|-V       print version string and exit

Sends a SCSI REPORT DENSITY SUPPORT command outputs the response in
ASCII hexadecimal or binary. By default it reports on density codes supported
by the drive (LU).
Options (10)
OptionDescriptionSource
--inhex, -i FNwhere FN is a file name whose contents are assumed to be ASCII hexadecimal.help + man
--maxlen, -m LEN|-mmax response length (allocation length in cdb) (def: 512 bytes)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
-M, --mediasets 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. (in the manual page but not in --help)man
-r, --rawoutput the SCSI response (i.e. the data-out buffer) in binary (to stdout) unless the --inhex=FN option is 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
-t, --typemsets 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. (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
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.