OS Manuals

/usr/bin/sg_prevent

SCSI utilities for Linux, Unix and Windows

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

Usage: sg_prevent [--allow] [--help] [--prevent=PC] [--verbose] [--version]
                  DEVICE
  where:
    --allow|-a            allow media removal
    --help|-h             print usage message then exit
    --prevent=PC|-p PC    prevent code value (def: 1 -> prevent)
                            0 -> allow, 1 -> prevent
                            2 -> persistent allow, 3 -> persistent prevent
    --verbose|-v          increase verbosity
    --version|-V          print version string and exit

Performs a SCSI PREVENT ALLOW MEDIUM REMOVAL command
Options (5)
OptionDescriptionSource
--prevent, -p PC|-pprevent code value (def: 1 -> prevent) 0 -> allow, 1 -> prevent 2 -> persistent allow, 3 -> persistent preventhelp + man
-a, --allowallow medium removal. (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
-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.