Solved

Huge difference between output of "du" and "df"

Posted on 2010-09-09
3
682 Views
Last Modified: 2013-12-15

How full is this filesystem?
Can someone explain the discrepancy:
[root@vrc45sd ~]# mount
/dev/sda3 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@vrc45sd ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              80G   51G   25G  68% /
/dev/sda1              99M   26M   69M  28% /boot
tmpfs                 754M     0  754M   0% /dev/shm
[root@vrc45sd ~]# du -scm /
22466   /
22466   total

Open in new window


Thanks!

0
Comment
Question by:alpha-lemming
3 Comments
 
LVL 6

Accepted Solution

by:
jghelfman40 earned 250 total points
Comment Utility
I was going to give a straight answer, until I saw this thread:
http://lists.centos.org/pipermail/centos/2009-September/082986.html

You may wish to look at it and do some investigation.

du and df report differently, and there are ways to figure out what is the right amount.

There is no clear answer, as there can be different reasons for the numbers you are seeing.
0
 
LVL 4

Expert Comment

by:ericnils
Comment Utility
I'm not sure why, but I am getting odd measurements using the -scm options as well.

Try this instead:
du -h --max-depth=0 /
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 250 total points
Comment Utility
have you deleted huge files recently which could be still in use (open) by some processes? Try to reboot and see if there still big difference
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now