Did you know?
Files in /proc show a size of 0, but they still have content.
The kernel creates the text when you read the file. Try cat /proc/uptime.
- System & services
- Last checked
Explained
/proc is a virtual file system. Nothing in it is stored on disk; the kernel generates each file’s content at the moment you read it. Because the size isn’t known in advance, ls reports 0 bytes:
ls -l /proc/uptimecat /proc/uptime
-r--r--r-- 1 root root 0 Nov 16 09:20 /proc/uptime
183462.51 1402981.33
The first number is the time since boot in seconds; the second is the total idle time of all CPU cores. Other useful files:
/proc/cpuinfoand/proc/meminfo: CPU and memory details/proc/loadavg: the load averages thatuptimeshows/proc/<PID>/: everything about one process, such ascmdline,environand its open files infd//proc/sys/: kernel settings, the onessysctlchanges
Because of the zero size, don’t trust tools that look at the size before reading. cat, grep and less work fine.
Learn more
- Linux Filesystem Hierarchy Standard (FHS): Every Directory Explained Full guide · Updated Nov 2026
-
catcommand cheat sheet Options and copy-ready examples
