Check the Disk usage Programmatically

Hi all,

Do we have anyway to get the freediskspace for within a C program?

I need functionality similar to 'df -h' -> which gives the % of utilization...

Otherwise, if we go and use 'system ("df -h /home/myhome/")', do we have any way of capturing the output into a string and parse the string to get the % of utilization?

-Sri

Check the man pages for popen and pclose. This will allow you to read the output of a command that has been execed using shell.

Thanks for the info blowtorch...