Home  >  Article  >  Backend Development  >  关于lsof命令查看某个文件被哪个进程打开

关于lsof命令查看某个文件被哪个进程打开

WBOY
WBOYOriginal
2016-06-06 20:07:411321browse

我想用lsof测试查看某个文件被哪个进程打开,这样写对不对
关于lsof命令查看某个文件被哪个进程打开

回复内容:

我想用lsof测试查看某个文件被哪个进程打开,这样写对不对
关于lsof命令查看某个文件被哪个进程打开

直接使用

<code>lsof /home/www/phpinfo.php</code>

不要加-r参数
-r参数是一直重复检测当前打开的文件

http://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316599.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn