跳转到主内容

为什么删除文件后Linux命令"df"和"du"的结果不同?

Views:
91
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用场景

  • ONTAP 9
  • NFS

问题解答

  • du 遍历目标并计算每个对象的空间使用量
    • 目标可以是目录、子目录、文件或整个文件系统
  • df 在文件系统中查询当前空间使用量

追加信息

  • 删除对象后、这些对象将与文件系统解除链接
    • 未链接的对象会占用空间、直到回收其块为止、但不再向客户端报告这些对象
    • du 将报告空间使用量、就像已回收块一样
    • df 回收已删除对象的块时、将缓慢显示空间使用量的变化

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.