du -gdu traverses the file tree, adding up the number of blocks allocated to eachdirectory, symlink, and file as reported by the stat() system call. This is howdu arrives at its total value.df -gdf looks at the file system disk block allocation maps ...
显示全部du -g
du traverses the file tree, adding up the number of blocks allocated to each
directory, symlink, and file as reported by the stat() system call. This is how
du arrives at its total value.
df -g
df looks at the file system disk block allocation maps to arrive at its total
and free values.
Disk blocks get assigned when a process is started and it will hold the disk block. It might use additional disk blocks for meta data. This additional disk blocks will get tracked by df-g but not du -g. Thus, df command will usually report high storage usage as compared to du. However, if the disk blocks got locked by a process and you use another application to delete the disk blocks, du will reflect the change but df will not.
http://www-01.ibm.com/support/docview.wss?uid=isg3T1000401仔细阅读全文,与进程占用和服务器重启没关系
收起