1

Can somebody explain, why a standard folder has always 4kB and some special directories have more or less?

some examples:

  • /dev 3280B, 0 Blocks, 16 Links
  • /etc 12288B, 24 Blocks, 119 Links
  • /proc 0B, 0 Blocks, 85 Links
  • /home 4096B, 8 Blocks, 4 Links

enter image description here

teekkari
  • 111
  • 1
    Please don't post screenshots of text. Copy the text here and apply code formatting instead. – muru Feb 03 '17 at 04:54
  • /dev and /proc on Linux usually have special filesystems mounted on them (devtmpfs, procfs) so the mounted directories occupy zero space on disk. – muru Feb 03 '17 at 04:55
  • @muru: got it, but why does /dev have a size of 3280B when it uses 0 blocks, and /proc have a size of 0B? – teekkari Feb 03 '17 at 05:07
  • Probably some difference in implementation. Different decisions may have been taken about reporting (otherwise meaningless) stats about them. – muru Feb 03 '17 at 05:17

1 Answers1

1

If you want to see proper size utilization of your directory/file in present directory please use below command :

du -sch *

for example :

[root:/]# du -sch *
0       bin
121M    boot
0       dev
22M     etc
20K     home
0       lib
0       lib64
0       media
0       mnt
316M    opt
0       proc
2.3M    root
25M     run
0       sbin
0       srv
0       sys
68K     tmp
1.1G    usr
269M    var
1.9G    total