How to see file handles like with “lsof -l”?

回眸只為那壹抹淺笑 提交于 2019-12-05 22:52:54

I don't understand, why not just use lsof:

lsof -p $$

$$ being a shell variable that holds the shell's process ID

You can also limit to just file descriptors like:

lsof -a -d0-65535 -p $$

On Linux, you can do something like ls -l /proc/$$/fd, which will show you what file descriptors are open in your shell.

Of course, substitute $$ with other numbers to inspect other processes (at least, the ones you own).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!