免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2498 | 回复: 4
打印 上一主题 下一主题

[新手入门] 为什么df -k和du-k的结果有这么大的区别? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-05-09 09:58 |只看该作者 |倒序浏览
我有一个用来存放数据库archive log的FS,用df和du查看结果如下
# df -k
/dev/db2arloglv     4194304   3106340   26%       20     1% /db2/PRD/log_archive

# du -k /db2/PRD/log_archive
1       /db2/PRD/log_archive/lost+found
2       /db2/PRD/log_archive/ARC_PRD
34664   /db2/PRD/log_archive/PRD
34667   /db2/PRD/log_archive

也就是说用df查看的结果是使用了1G左右,而用du查看的结果只用30M多一点,为什么会有这么大的差别?

论坛徽章:
0
2 [报告]
发表于 2003-05-09 10:18 |只看该作者

为什么df -k和du-k的结果有这么大的区别?

df 显示的有free的大小,你仔细看看应该不会有差别

论坛徽章:
0
3 [报告]
发表于 2003-05-09 10:19 |只看该作者

为什么df -k和du-k的结果有这么大的区别?

have you tried: with -s ?
# du -sk /db2/PRD/log_archive

论坛徽章:
0
4 [报告]
发表于 2003-05-09 10:30 |只看该作者

为什么df -k和du-k的结果有这么大的区别?

The du command displays the number of blocks used for files. If the File parameter specified is actually a directory, all files within the directory are reported on. If no File parameter is provided, the du command uses the files in the current directory.
Specifying
the -k flag calculates the block count in 1024-byte units.


he df command displays information about total space and available space on a
file system. The FileSystem parameter specifies the name of the device on which
the file system resides, the directory on which the file system is mounted, or
the relative path name of a file system. The File parameter specifies a file or
a directory that is not a mount point. If the File parameter is specified, the
df command displays information for the file system on which the file or
directory resides. If you do not specify the FileSystem or File parameter, the
df command displays information for all currently mounted file systems. File
system statistics are displayed in units of 512-byte blocks by default.

论坛徽章:
0
5 [报告]
发表于 2003-05-09 11:19 |只看该作者

为什么df -k和du-k的结果有这么大的区别?

可不可以这么理解?
df和du在对文件系统的容量进行统计的时候,用了不同的方式。
如果是这样的话,那么他们分别用什么方式呢?

to dew
如何仔细看?

to zanexxx
用-s结果相同
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP