Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-09-09
3
Medium Priority
?
705 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 1000 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

971 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