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?

1 Answer 1

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.

1
  • Ah yes, that was exactly it.
    – thinc
    Feb 4, 2016 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .