Why the result of linux commands "df" and "du" are different after deleting file?
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