Skip to main content
NetApp Response to Russia-Ukraine Cyber Threat
In response to the recent rise in cyber threat due to the Russian-Ukraine crisis, NetApp is actively monitoring the global security intelligence and updating our cybersecurity measures. We follow U.S. Federal Government guidance and remain on high alert. Customers are encouraged to monitor the Cybersecurity and Infrastructure Security (CISA) website for new information as it develops and remain on high alert.
NetApp Knowledge Base

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

Views:
16,137
Visibility:
Public
Votes:
11
Category:
ontap-9
Specialty:
nfs
Last Updated:

Applies to

ONTAP 9

Answer

du is used to estimate file space usage—space used under a particular directory or files on a file system.
 
df is used to display the amount of available disk space for file systems on which the invoking user has appropriate read access.
 
After deleting a file, the disk space occupied by this file will be slowly released.
 
The result of the command du doesn't include the size of the deleting file.
 
But the result of the command df includes the size of the deleting file due to its disk space is not released immediately.
 
So after deleting the file, the results of df and du are different until the disk space is released.

Additional Information

additionalInformation_text

 

Scan to view the article on your device

 

  • Was this article helpful?