I'm running Debian 6.x
df -h
tells me this:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 19G 17G 696M 97% /
....
But these numbers don't add up...
# for D in $(ls -1 / | grep -vE "(home|media)"); do echo -n "$D ..........."; du -ch $D | grep total; done;
bin ...........6.0M total
boot ...........14M total
dev ...........256K total
etc ...........19M total
initrd.img ...........0 total
lib ...........96M total
lost+found ...........16K total
mnt ...........4.0K total
opt ...........4.0K total
proc ...........du: cannot access `proc/25117/task/25117/fd/3': No such file or directory
du: cannot access `proc/25117/task/25117/fdinfo/3': No such file or directory
du: cannot access `proc/25117/fd/3': No such file or directory
du: cannot access `proc/25117/fdinfo/3': No such file or directory
0 total
root ...........643M total
sbin ...........4.7M total
selinux ...........4.0K total
srv ...........200K total
sys ...........0 total
tmp ...........308K total
usr ...........4.0K usr/src/linux-headers-2.6.32-5-686/include/config/mtdram/total
4.5G total
var ...........677M total
vmlinuz ...........0 total
I've rebooted and it reports the same. What am I'm missing? Where's the discrepancy?
du -hx /
might be easier (and safer). – Hauke Laging Jan 16 '15 at 22:51/dev/sda1
? – devnull Jan 16 '15 at 23:00mkdir /full-root && mount --bind / /full-root && du -xc /full-root
to check. – Gilles 'SO- stop being evil' Jan 16 '15 at 23:02