cancel
Showing results for 
Search instead for 
Did you mean: 

diff in df -h and du -sh

 
Highlighted
Super Advisor

diff in df -h and du -sh

oracle:~ # df -h | grep u10
/dev/sdi1 200G 118G 83G 59% /u10

oracle:~ # du -sh /u10/
111G /u10/

why is there a difference in df -h and du-sh?
used space is 118G with df and 111G in du -sh
3 REPLIES 3
Highlighted
Respected Contributor

Re: diff in df -h and du -sh

du..>Disk Usage - report the amount of disk space used by the specified files and for each subdirectory
df ..> report file system disk space usage

orphan files on the file system were responsible for the significant difference between the df and du commands.
ie,one files may be opened by one process and the file get deleted before the precess end.At this state du can't count the deleted file ,but df will see that it is used by the process.

Find the below thread.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1284464040318+28353475&threadId=1134300

Bijeesh
Highlighted
Honored Contributor

Re: diff in df -h and du -sh

df - report file system disk space usage
du -- display disk usage statistics

in file system it also displayes size of whatever files has been open, that is why its always more.

du would only tell you the exact size of files in the server.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Highlighted
Super Advisor

Re: diff in df -h and du -sh

thank you all for the clarification