OS Manuals

/usr/bin/sg_map

SCSI utilities for Linux, Unix and Windows

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

Unknown switch: --help
Usage: sg_map [-a] [-h] [-i] [-n] [-sd] [-scd or -sr] [-st] [-V] [-x]
  where:
    -a      do alphabetic scan (ie sga, sgb, sgc)
    -h or -?    show this usage message then exit
    -i      also show device INQUIRY strings
    -n      do numeric scan (i.e. sg0, sg1, sg2) (default)
    -sd     show mapping to disks
    -scd    show mapping to cdroms (look for /dev/scd<n>
    -sr     show mapping to cdroms (look for /dev/sr<n>
    -st     show mapping to tapes (st and osst devices)
    -V      print version string then exit
    -x      also show bus,chan,id,lun and type

If no '-s*' arguments given then show all mappings. This utility
is DEPRECATED, do not use in Linux 2.6 series or later.
Options (10)
OptionDescriptionSource
-aassume the sg devices have alphabetical device names and loop through /dev/sga, /dev/sgb, etc.help + man
-h, -?show this usage message then exithelp + man
-iin addition do a standard INQUIRY and output vendor, product and revision strings for devices that are found.help + man
-nassume the sg devices have numeric device names and loop through /dev/sg0, /dev/sg1, etc.help + man
-sddisplay mappings to SCSI disk device nameshelp + man
-scddisplay mappings to SCSI cdrom device names of the form /dev/scd0, /dev/scd1 etchelp + man
-srdisplay mappings to SCSI cdrom device names of the form /dev/sr0, /dev/sr1 etchelp + man
-stshow mapping to tapes (st and osst devices)help + man
-Vprint out version string then exit (without further ado).help + man
-xafter each active sg device name is displayed there are five digits: <host_number> <bus> <scsi_id> <lun> <scsi_type>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.