OS Manuals

/usr/bin/sg_read_long

SCSI utilities for Linux, Unix and Windows

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

Usage: sg_read_long [--16] [--correct] [--help] [--lba=LBA] [--out=OF]
                    [--pblock] [--readonly] [--verbose] [--version]
                    [--xfer_len=BTL] DEVICE
  where:
    --16|-S              do READ LONG(16) (default: READ LONG(10))
    --correct|-c         use ECC to correct data (default: don't)
    --help|-h            print out usage message
    --lba=LBA|-l LBA     logical block address (default: 0)
    --out=OF|-o OF       output in binary to file named OF
    --pblock|-p          fetch physical block containing LBA
    --readonly|-r        open DEVICE read-only (def: open it read-write)
    --verbose|-v         increase verbosity
    --version|-V         print version string and exit
    --xfer_len=BTL|-x BTL    byte transfer length (< 10000) default 520

Perform a SCSI READ LONG (10 or 16) command. Reads a single block with
associated ECC data. The user data could be encoded or encrypted.
Options (10)
OptionDescriptionSource
--lba, -l LBA|-lwhere LBA is the logical block address of the sector to read.help + man
--out, -o OF|-oinstead of outputting ASCII hex to stdout, send it in binary to the file called OF.help + man
--xfer_len, -x BTL|-xwhere BTL is the byte transfer length (default to 520).help + man
-S, --16uses a SCSI READ LONG(16) command. (in the manual page but not in --help)man
-c, --correctsets the 'CORRCT' bit in the SCSI READ LONG 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
-p, --pblocksets the 'PBLOCK' bit in the SCSI READ LONG command. (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 (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.