I\'m using the following code to try to read the results of a df command in Linux using popen.
df
popen
#include // file an
To answer the question in the update:
char buffer[1024]; char * line = NULL; while ((line = fgets(buffer, sizeof buffer, fp)) != NULL) { // parse one line of df's output here. }
Would this be enough?