小编gue*_*ter的帖子

cd into `/proc/xxx` 即使没有进程也能工作

今天我发现/proc文件夹有些奇怪。有一个 PID (7825),我无法通过 将其视为正在运行的进程ps,我在制作时也看不到进程 ID,ls /proc但我可以看到它,ls /proc/7825也可以 cd 进入它。这里的输出:

# ls /proc

...
dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:57 7812
dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:52 7820
dr-xr-xr-x   9 root            root                0 May 16 20:52 7836
dr-xr-xr-x   9 root            root                0 May 16 20:52 786
dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:57 7923
dr-xr-xr-x   9 xxxxxxx         xxxxxxx             0 May 16 20:52 7924
...
Run Code Online (Sandbox Code Playgroud)
ps aux | grep …
Run Code Online (Sandbox Code Playgroud)

proc

2
推荐指数
1
解决办法
31
查看次数

标签 统计

proc ×1