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
In reply to Re: get the size of a special device (drive)
by Joost
in thread get the size of a special device (drive)
by exodist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |