Key*_*ate 1 linux filesystems size proc
ls -rlth /proc/stat
-r--r--r-- 1 root root 0 Feb 21 04:25 /proc/stat
Run Code Online (Sandbox Code Playgroud)
虽然如果我们cat
它,它有足够的内容。
那是因为它是一个虚拟文件,没有预定义的已知大小,实际大小,即返回的数据量将根据您读取它的时间而有所不同。
某些/proc
文件可能具有非空大小,因为它是预先知道的。
/proc/kcore
This file represents the physical memory of the system and is stored in the ELF core file for-
mat. With this pseudo-file, and an unstripped kernel (/usr/src/linux/vmlinux) binary, GDB can
be used to examine the current state of any kernel data structures.
The total length of the file is the size of physical memory (RAM) plus 4KB.
Run Code Online (Sandbox Code Playgroud)
但是,鉴于我的机器上没有 128 TB 的 RAM,报告的值和可能读取的大小与文档不匹配:
$ ls -lh /proc/kcore
-r--------. 1 root root 128T Feb 23 16:10 /proc/kcore
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4110 次 |
最近记录: |