Results 1 to 4 of 4
Can someone here pls tell me any command to get number of hard disks in linux. I have used fdisk -l and df -h. but is tehre any other sure ...
- 04-25-2009 #1
Number of Hard disks in linux
Can someone here pls tell me any command to get number of hard disks in linux. I have used fdisk -l and df -h. but is tehre any other sure shot method of knowing this. Kindly help me out on this
- 04-25-2009 #2Code:
dmesg | grep sd | grep DISK | wc -l
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 04-27-2009 #3It says 0 on my computerdmesg | grep sd | grep DISK | wc -l
but
works.dmesg | grep sd | grep disk | wc -l
- 04-27-2009 #4
I forgot that Linux is case sensitive.

Thanx b2bwild !
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


Reply With Quote