Solved

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

Posted on 2010-09-09
3
694 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
jghelfman40 earned 250 total points
ID: 33640458
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
ID: 33640827
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
ID: 33641745
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 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