SG_READ_LONG(8)

NAME
sg_read_long - send the scsi command read long

SYNOPSIS
sg_read_long [--correct] [--help] [--lba=<num>] [--out=<name>] [--verbose] [--version] [--xfer_len=<num>] <scsi_device>

DESCRIPTION

Send READ LONG command to a Linux SCSI device. The read buffer is output in hex and ASCII to stdout or placed in a file..

--correct | -c
    sets the 'CORRCT' bit in the READ LONG SCSI command. When set the data is corrected by the ECC before being transferred back to this utility. The default is to leave the 'CORRCT' bit clear in which case the data is not corrected.

--help | -h
    output the usage message then exit.

--lba=<num> | -l <num>
    the logical block address of the sector to read. Assumed to be in decimal unless prefixed with '0x'. Defaults to lba 0. Only 32 bit lbas currently supported.

--out=<name> | -o <name>
    instead of outputting ASCII hex to stdout, try to send it to the file called <name>. If '-' is given as the <name> then the (binary) output is sent to stdout. Note that all informative and error output is sent to stderr.

--verbose | -v
    increase the level of verbosity, (i.e. debug output).

--version | -V
    print the version string and then exit.

--xfer_len=<num> | -x <num>
    the transfer length in bytes (default to 520). If the given value (or the default) does not match the "long" block size of the device, the appropriate xfer_len value is derived from the error response and printed (to stderr).

The lba and xfer_len numerical arguments may be followed by the following multiplicative suffixes: c C *1; b B *512; k *1,024; K *1,000; m *1,048,576; M *1,000,000; g *1,073,741,824; and G *1,000,000,000

Alternatively numerical values can be given in hexadecimal preceded by either "0x" or "0X". When hex numbers are given multipliers cannot be used.

AUTHORS
Written by Douglas Gilbert.

REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>.

COPYRIGHT
Copyright © 2004 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
sg_write_long, sg_dd