struct statvfs vfs; statvfs("/", &vfs); printf("File system block size: %lun",vfs.f_bsize); printf("Fundamental file system block size: %lun",vfs.f_frsize); printf("Blocks on FS in units of f_frsize: %dn",vfs.f_blocks); printf("Free blocks: %dn",vfs.f_bfree); printf("Blocks available to non-root: %dn",vfs.f_bavail); printf("Total inodes: %dn",vfs.f_files); printf("Free inodes: %dn",vfs.f_ffree); printf("Free inodes for non-root: %dn",vfs.f_favail); printf("Filesystem ID: %lun",vfs.f_fsid); printf("Bit mask of values: %lun",vfs.f_flag); printf("Max file name length: %lun",vfs.f_namemax);