Skip to main content
NetApp Knowledge Base

Why the result of linux commands "df" and "du" are different after deleting file?

Views:
21,950
Visibility:
Public
Votes:
20
Category:
ontap-9
Specialty:
nfs
Last Updated:

Applies to

  • ONTAP 9
  • NFS

Answer

  • du walks through the target and counts the space usage of each object
    • The target can be a directory, subdirectory, file, or the entire filesystem
  • df queries the filesystem for the current space usage

Additional Information

  • When objects are deleted, they are unlinked from the filesystem
    • Unlinked objects take up space until their blocks are reclaimed, but the objects are no longer reported to clients
    • du will report space usage as if the blocks have been reclaimed
    • df will slowly show changes in space usage as the blocks of the deleted object(s) are reclaimed

 

Scan to view the article on your device

 

  • Was this article helpful?