C言語を使ってディスクの空き容量を調べるには,statvfsを使う.Solarisで動作確認済み. #include <stdio.h> #include <sys/statvfs.h> #include <sys/types.h> main(){ struct statvfs buf; statvfs(".",&buf); printf("frsize(byte/block): %lu\n",buf.f_frsize); /* バイト/ブロック */ printf("fblocks(block): %lu\n",buf.f_blocks); /* 総ブロック数 */ printf("bavail(block): %lu\n",buf.f_bavail); /* 使用可能ブロック数 */ printf("-------------------------\n"); printf("avai