我可以通过lsof看到进程对于特定文件有一个打开的文件句柄,但是有什么方法可以看到它是什么样的文件句柄(例如: r,rw)?
发布于 2013-12-16 19:41:04
来自lsof手册
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.所以在队伍里
liferea 3264 dennis 0r CHR 1,3 0t0 1049 /dev/null您可以看到stdin在只读模式下是打开的。
发布于 2013-12-16 19:40:34
不过,我认为这是lsof正常输出的一部分:
FD后面跟着以下几个字符之一,描述文件打开的模式:
R表示读访问;w表示读写访问;u表示读写访问;
https://serverfault.com/questions/561739
复制相似问题