0
$ pwd
/

$ du -hs *
0       bin
8.2M    boot
82M     dev
23M     etc
0       lib
0       lib64
16K     lost+found
4.0K    media
0       misc
4.0K    mnt
0       net
106M    opt
44K     root
414M    run
0       sbin
4.0K    srv
0       sys
1.3G    usr
36M     var

$ du -hs var
118M    var

Why is the same directory reporting two different sizes?

0

You might notice that dev reports a large size, which when added to var produces the same as var by itself (82+36=118). Normally /dev would be almost empty of space, consisting solely of directories and special files.

Perhaps there's some filesystem (or large hard-linked file) mounted in both which du -sh * factors out.

| improve this answer | |
  • Ah yes, that was exactly it. – thinc Feb 4 '16 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.