LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1712|回复: 2

statfs结构里的f_bavail与f_bfree 区别是什么

[复制链接]
发表于 2009-2-13 18:09:43 | 显示全部楼层 |阅读模式

  1.               struct statfs {
  2.                  long    f_type;     /* type of filesystem (see below) */
  3.                  long    f_bsize;    /* optimal transfer block size */
  4.                  long    f_blocks;   /* total data blocks in file system */
  5.                  long    f_bfree;    /* free blocks in fs */
  6.                  long    f_bavail;   /* free blocks avail to non-superuser */
  7.                  long    f_files;    /* total file nodes in file system */
  8.                  long    f_ffree;    /* free file nodes in fs */
  9.                  fsid_t  f_fsid;     /* file system id */
  10.                  long    f_namelen;  /* maximum length of filenames */
  11.               };
复制代码


请教!
 楼主| 发表于 2009-2-14 11:01:41 | 显示全部楼层
在计算磁盘剩余空间时为什么用f_bavail,如果用f_bfree计算,得到的是什么?
回复 支持 反对

使用道具 举报

发表于 2009-2-14 13:04:19 | 显示全部楼层
一般來說 filesystem 會保留 5% 給 root
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表