[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Get a list of hard disks



On Fri, Aug 13, 2004 at 04:13:23PM -0400, Tong wrote:
> Hi, 
> 
> How can I get a list of hard disks available in my system? 

Try these:

   stefan:~$ ls /proc/ide -l --color=none
   total 0
   -r--r--r--    1 root     root            0 Aug 13 13:23 drivers
   lrwxrwxrwx    1 root     root            0 Aug 13 13:23 hda -> ide0/hda
   lrwxrwxrwx    1 root     root            0 Aug 13 13:23 hdb -> ide0/hdb
   lrwxrwxrwx    1 root     root            0 Aug 13 13:23 hdc -> ide1/hdc
   dr-xr-xr-x    4 root     root            0 Aug 13 13:23 ide0
   dr-xr-xr-x    3 root     root            0 Aug 13 13:23 ide1
   stefan:~$
   stefan:~$ cat /proc/partitions         
   major minor  #blocks  name
   
      3     0   13260240 hda
      3     1       8001 hda1
      3     2       8032 hda2
      3     3          1 hda3
      3     5     377496 hda5
      3     6      56196 hda6
      3     7    9767488 hda7
      3     8    3028221 hda8
      3    64    4210920 hdb
      3    65    1365493 hdb1
      3    66    2843505 hdb2



Reply to: