SCSI_READCAP(8)
β¨ scsi_readcap (SCSI_READCAP(8)) β¨
okay so bestie, scsi_readcap is a bash shell script that runs the sg_readcap utility on every DEVICE you hand it π
π«Ά (it's the SCSI_READCAP(8) manual page, btw π)
π§ NAME
scsi_readcap - do SCSI READ CAPACITY command on disks π
π SYNOPSIS
scsi_readcap [--brief] [--help] [--long] [--verbose] DEVICE [DEVICE]*
πΈ DESCRIPTION
okay so this bash shell script calls the sg_readcap utility on each DEVICE you give it. It sends a SCSI READ CAPACITY command to each DEVICE, and it's giving main character energy πβ¨
the default move is sending the 10 byte cdb READ CAPACITY(10) command to each DEVICE. but if the response says the number of blocks is greater than or equal to 2**32 - 1, then the script sends READ CAPACITY(16) and outputs that response instead ππ₯
π OPTIONS
bestie, arguments to long options are mandatory for short options as well π
-b,--briefβ shortens the output to two hexadecimal numbers, both prefixed by0xπ The first is the number of blocks available and the second is the size of each block in bytes (like0x12a19eb0 0x200). If an error pops up, you get0x0 0x0and the script keeps going if there are more DEVICEs π-h,--helpβ prints the usage message, then exits π¦-l,--longβ the default is sending READ CAPACITY(10) (the 10 byte cdb variant). with this option, READ CAPACITY(16) gets sent instead, and it yields more info in its response π-v,--verboseβ increases the level of verbosity π
π¦ EXIT STATUS
the exit status is 0 when the script is successful π«Ά otherwise the exit status is whatever the last sg_readcap utility called gave back. see the sg3_utils(8) man page for the deets πΈ
π AUTHORS
Written by D. Gilbert β¨
π₯ COPYRIGHT
Copyright Β© 2009-2013 Douglas Gilbert π this software is distributed under a BSD-2-Clause license. there is NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE π
π§ SEE ALSO
sg_readcap (sg3_utils) π
okay that's the whole tea, bestie π«Ά this is from sg3_utils-1.36, May 2013, SCSI_READCAP(8) πβ¨
π¦ where this page comes from
- alpine 3.24: sg3_utils-doc 1.48-r0 Β· BSD-2-Clause AND GPL-2.0-or-later
- arch rolling: sg3_utils 1.49-1 Β· GPL-2.0-or-later AND BSD-2-Clause
- centos-stream 10: sg3_utils 1.48-11.el10 Β· GPL-2.0-or-later AND BSD-2-Clause
- debian trixie: sg3-utils 1.48-3~deb13u1
- fedora 43: sg3_utils 1.48-10.fc43 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 43: sg3_utils 1.48-6.fc43 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 44: sg3_utils 1.48-10.fc44 Β· GPL-2.0-or-later AND BSD-2-Clause
- fedora 44: sg3_utils 1.48-8.fc44 Β· GPL-2.0-or-later AND BSD-2-Clause
- nixos 26.05: sg3_utils 1.48
- nixpkgs unstable: sg3_utils 1.49
- ubuntu questing: sg3-utils 1.48-2ubuntu1
- ubuntu resolute: sg3-utils 1.48-3ubuntu3
- ubuntu resolute: sg3-utils 1.48-3ubuntu3.2
- ubuntu stonking: sg3-utils 1.48-3ubuntu5
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms