Why du -sh * tells me sys has 0 size?

Alessandro Merletti De Palo asked:

I use du -sh * to find out the size of folders, but the sys folder is giving me 0, and the same about any folder inside sys.
find . | wc -l gives me 11k files.
Do you know why and can you suggest a workaround?

thanks

My answer:


What do you want to work around? 0 is the correct number. /sys is a virtual filesystem, consisting of kernel data exposed in a filesystem-like interface. It does not actually take up any space.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.