lsof命令查看端口、程序及开启文件的进程
时间:2015-05-01 21:14 来源:www.it.net.cn 作者:IT
lsof abc.txt 显示开启文件abc.txt的进程
lsof -i :22 知道22端口现在运行什么程序
lsof -c nsd 显示nsd进程现在打开的文件
lsof -g gid 显示归属gid的进程情况
lsof +d /usr/local/ 显示目录下被进程开启的文件
lsof +D /usr/local/ 同上,但是会搜索目录下的目录,时间较长
(责任编辑:IT)
lsof abc.txt 显示开启文件abc.txt的进程 lsof -i :22 知道22端口现在运行什么程序 lsof -c nsd 显示nsd进程现在打开的文件 lsof -g gid 显示归属gid的进程情况 lsof +d /usr/local/ 显示目录下被进程开启的文件
lsof +D /usr/local/ 同上,但是会搜索目录下的目录,时间较长 |