OS Manuals

/usr/bin/sg_verify

SCSI utilities for Linux, Unix and Windows

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

Usage: sg_verify [--0] [--16] [--bpc=BPC] [--count=COUNT] [--dpo]
                 [--ebytchk=BCH] [--ff] [--group=GN] [--help] [--in=IF]
                 [--lba=LBA] [--ndo=NDO] [--quiet] [--readonly]
                 [--verbose] [--version] [--vrprotect=VRP] DEVICE
  where:
    --0|-0              fill buffer with zeros (don't read stdin)
    --16|-S             use VERIFY(16) (def: use VERIFY(10) )
    --bpc=BPC|-b BPC    max blocks per verify command (def: 128)
    --count=COUNT|-c COUNT    count of blocks to verify (def: 1).
    --dpo|-d            disable page out (cache retention priority)
    --ebytchk=BCH|-E BCH    sets BYTCHK value, either 1, 2 or 3 (def: 0).
                            BCH overrides BYTCHK=1 set by '--ndo='. If
                            BCH is 3 then NDO must be the LBA size
                            (plus protection size if DIF active)
    --ff|-f             fill buffer with 0xff bytes (don't read stdin)
    --group=GN|-g GN    set group number field to GN (def: 0)
    --help|-h           print out usage message
    --in=IF|-i IF       input from file called IF (def: stdin)
                        only active if --ebytchk=BCH given
    --lba=LBA|-l LBA    logical block address to start verify (def: 0)
    --ndo=NDO|-n NDO    NDO is number of bytes placed in data-out buffer.
                        These are fetched from IF (or stdin) and used
                        to verify the device data against. Forces
                        --bpc=COUNT. Sets BYTCHK (byte check) to 1
    --quiet|-q          suppress miscompare report to stderr, still
                        causes an exit status of 14
    --readonly|-r       open DEVICE read-only (def: open it read-write)
    --verbose|-v        increase verbosity
    --version|-V        print version string and exit
    --vrprotect=VRP|-P VRP    set vrprotect field to VRP (def: 0)

Performs one or more SCSI VERIFY(10) or SCSI VERIFY(16) commands. sbc3r34
made the BYTCHK field two bits wide (it was a single bit).
Options (17)
OptionDescriptionSource
--bpc, -b BPC|-bthis option is ignored if --ndo=NDO is given.help + man
--count, -c COUNT|-cwhere COUNT specifies the number of blocks to verify.help + man
--ebytchk, -E BCH|-Esets the BYTCHK field to BCH overriding the value (1) set by the --ndo=NDO option.help + man
--group, -g GN|-gwhere GN becomes the contents of the group number field in the SCSI VERIFY(16) command.help + man
--in, -i IF|-iwhere IF is the name of a file from which NDO bytes will be read and placed in the data-out buffer.help + man
--lba, -l LBA|-lwhere LBA specifies the logical block address of the first block to start the verify operation.help + man
--ndo, -n NDO|-nNDO is the number of bytes to obtain from the FN file (if --in=FN is given) or from stdin.help + man
--vrprotect, -P VRP|-Pwhere VRP is the value in the vrprotect field in the VERIFY command cdb.help + man
-0, --0a buffer NDO bytes long full of zeros is sent as the data-out part of a VERIFY command. (in the manual page but not in --help)man
-S, --16uses a VERIFY(16) command (default VERIFY(10)). (in the manual page but not in --help)man
-d, --dpodisable page out changes the cache retention priority of blocks read on the device's cache to the lowest priority. (in the manual page but not in --help)man
-f, --ffa buffer NDO bytes long full of 0xff bytes is sent as the data-out part of a VERIFY command. (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
-q, --quietsuppress the sense buffer messages associated with a MISCOMPARE sense key that would otherwise be sent to stderr. (in the manual page but not in --help)man
-r, --readonlyopens the DEVICE read-only rather than read-write which is the default. (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 (2) from the manual page
0it is successful
98there was a MISCOMPARE

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