SG_RMSN(8)
π SG_RMSN(8) β SG3_UTILS bestie edition π
okay so this is the SG3_UTILS manual page for sg_rmsn(8), and we're gonna make it make sense together π«Ά
NAME πΈ
sg_rmsn β send the SCSI READ MEDIA SERIAL NUMBER command, bestie π
SYNOPSIS β¨
sg_rmsn [--help] [--raw] [--readonly] [--verbose] [--version] DEVICE
DESCRIPTION π¦
So like, sg_rmsn sends a SCSI READ MEDIA SERIAL NUMBER command to DEVICE and outputs the response. That's the whole main character energy of this page π
This command is described in SPC-3, found at www.t10.org. It was originally added to SPC-3 in revision 11 (2003/2/12). It is not a mandatory command, and ngl the author has not seen any SCSI devices that support it ππ
OPTIONS π
Arguments to long options are mandatory for short options as well. periodt.
-h,--helpβ output the usage message then exit. cute and helpful π-r,--rawβ sends the serial number (if found) tostdout. Heads up bestie: this output may contain non-printable characters (e.g. the serial number is padded withNULLs at the end so its length is a multiple of4). The default action is to print the serial number out inASCII-HEXwithASCIIcharacters to the right. All error messages are sent tostderr. slay that raw output π-R,--readonlyβ opens the DEVICE read-only rather than read-write, which is the default. The Linux sg driver needs read-write access for theSCSI READ MEDIA SERIAL NUMBERcommand, but other access methods may require read-only access. lowkey important π«Ά-v,--verboseβ increase the level of verbosity, (i.e. debug output). it's giving βtell me everythingβ energy π₯-V,--versionβ print the version string and then exit. iconic lil version check π
NOTES π§
Device identification information is also found in a standard INQUIRY response and its VPD pages (see sg_vpd). The relevant VPD pages are the "device identification page" (VPD page 0x83) and the "unit serial number" page (VPD page 0x80). iykyk π
The MMC-4 command set for CD/DVD/HD-DVD/BD drives has a "media serial number" feature (0x109) [and a "logical unit serial number" feature]. These can be viewed with sg_get_config. obsessed with all these serial number side quests fr fr π
EXIT STATUS π
The exit status of sg_rmsn is 0 when it is successful. Otherwise see the sg3_utils(8) man page. vibe check passed = 0 π
AUTHORS π
Written by Douglas Gilbert. king behavior πβ¨
REPORTING BUGS π
Report bugs to <dgilbert at interlog dot com>. please be nice about it π
COPYRIGHT β
Copyright Β© 2005-2012 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.
no cap: there isNOwarranty, not even forMERCHANTABILITYORFITNESS FOR A PARTICULAR PURPOSEπ legal tea has been spilled β
SEE ALSO π
sg_vpd(sg3_utils)sg_get_config(sg3_utils)
okay bestie, source/version is sg3_utils-1.31, dated November 2012, and this lil masterpiece is the SG_RMSN(8) page β mwah ππ
π¦ where this page comes from
- arch rolling: sg3_utils 1.49-1 Β· GPL-2.0-or-later AND BSD-2-Clause
- nixpkgs unstable: sg3_utils 1.49
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms