View Full Version : getting disk size
nishanthaMe
November 4th, 2007, 10:49 PM
I have a SATA hard disk in my computer and I want to get information such as it's size,used space by means of a C programe.Is there any system calls or configuration files to read or what should i do for this.
NathanB
November 4th, 2007, 11:14 PM
At your fingertips:
http://www.google.com/search?q=linux+syscall+list
FXEF
November 4th, 2007, 11:38 PM
This is not a C program, but simply typing df -h in a terminal will give you the hdd info.
chris.m.ball
November 5th, 2007, 12:31 AM
I was inspired by this post to put together a python script and associated article on my blog. If you're at all curious how a python script might consume the "df" linux call, this might be informative for you :popcorn:
http://strainthebrain.blogspot.com/2007/11/python-script-for-calculating-disk-size.html
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.