Re: Easy way to detect hard drives and partitions in Linux

2005-06-04 Thread Mike Meyer
Jeff Epler [EMAIL PROTECTED] writes: I need a way to detect hard drives and their partitions... labels would be nice too... I did some googling but did not find anything all too useful. This will strictly be on Linux / Unix so any help would be greatly appreciated. You're not going to find a

Easy way to detect hard drives and partitions in Linux

2005-06-02 Thread RunLevelZero
I need a way to detect hard drives and their partitions... labels would be nice too... I did some googling but did not find anything all too useful. This will strictly be on Linux / Unix so any help would be greatly appreciated. TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy way to detect hard drives and partitions in Linux

2005-06-02 Thread Peter Hansen
RunLevelZero wrote: I need a way to detect hard drives and their partitions... labels would be nice too... I did some googling but did not find anything all too useful. This will strictly be on Linux / Unix so any help would be greatly appreciated. os.popen('/sbin/sfdisk -l /dev/hda') etc...

Re: Easy way to detect hard drives and partitions in Linux

2005-06-02 Thread Jeff Epler
You're not going to find a single portable unix way of doing this. The format of /etc/fstab and /etc/mtab are pretty portable, but they only list mountable/mounted partitions, not all partitions. In addition to the linux possibilities mentioned in another reply, there is also /proc/partitions.

Re: Easy way to detect hard drives and partitions in Linux

2005-06-02 Thread RunLevelZero
Jeff Epler wrote: You're not going to find a single portable unix way of doing this. The format of /etc/fstab and /etc/mtab are pretty portable, but they only list mountable/mounted partitions, not all partitions. In addition to the linux possibilities mentioned in another reply, there is