programmatic disk free information
Hello everybody,
I'm writing an application that has to run on SuSE and on Montavista. I need to see the amount of disk space available. So far the only option I found was to do a 'df' and then parse the result. Do you know any other solution to this? I would prefer to do it programmatic way since I think it would be faster and safer (something similar to accessing /proc/meminfo for information about memory usage). Thanks, vidi |
Hi,
These functions are what you are looking for Code:
man getmntent |
These functions will give me the partition list. They are useful BUT what I need is for each mounted partition to get its size and the available/used space.
Basically what I need is exactly what the command 'df' does but I have to do it in my program. I wouldn't use df as I want to have as little dependencies as possible. |
All times are GMT -5. The time now is 05:54 PM. |