我可以用 lsof 看到一个进程有一个特定文件的打开文件句柄,但是有没有办法可以看到它是什么类型的文件句柄(例如:r,rw)?
FD is followed by one of these characters, describing the mode
under which the file is open:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock
character follows;
`-' if mode unknown and lock
character follows.
Run Code Online (Sandbox Code Playgroud)
所以在行
liferea 3264 dennis 0r CHR 1,3 0t0 1049 /dev/null
Run Code Online (Sandbox Code Playgroud)
可以看到 stdin 以只读模式打开