Hard Drive Serial Number?
Is there a command in linux that will give the hard drive serial number? (hopefully this is a non-specific distribution command....)
Sorry for the simplicity of this question.... Linux Newbie..... |
If you have DOS on your machine, you can type "dir" in and it will list the serial number of the current drive and the conternets of the directory you are in, but for doing it in Linux, I could'nt tell you :D.
|
Thanks, but, I knew the DOS command..... looking for Linux and Mac now....
|
well the serial number is presumably in /proc/ide/hdX/identify, as to a foraml way to get the data i don't know.
you can also get a decent more usable output from "hdparm -i /dev/hda": Code:
[root@trevor chris]# hdparm -i /dev/hda |
Have a look at the kernel header file "hdreg.h". There you can find a struct called "hd_driveid". It looks like this:
Code:
struct hd_driveid { Quote:
Code:
[root@k0Nkr3Tix /proc/ide/ide3/hdh]# |
All times are GMT -5. The time now is 10:24 PM. |