in reply to get the size of a special device (drive)
Since you're probably on linux, parsing the output of df or df -h would be very easy. Maybe look at /sys/block/*drivename*/size
I don't think this can be solved completely OS-independently, but I'd be interested in something that worked better on all/most POSIX systems
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: get the size of a special device (drive)
by exodist (Monk) on May 30, 2007 at 21:35 UTC | |
by Joost (Canon) on May 30, 2007 at 22:28 UTC | |
by blazar (Canon) on May 30, 2007 at 22:35 UTC | |
by Joost (Canon) on May 30, 2007 at 22:41 UTC | |
by blazar (Canon) on May 31, 2007 at 07:58 UTC | |
by exodist (Monk) on May 31, 2007 at 00:18 UTC |