Ubuntu18.04系统如何使用lsof列出系统当前打开文件的进程
发布时间:2023-1-10 11:36:20 来源: 纵横云
Ubuntu18.04系统如何使用lsof列出系统当前打开文件的进程
lsof 命令的功能是列出当前打开文件的进程。在ubuntu18.04中如何使用lsof命令呢?本文给出详细说明。
1.显示指定用户所属进程打开的文件。
lsof -u 用户名 -a

2.显示打开某文件的进程
lsof 文件名

3.显示某端口现在运行什么程序
lsof -i :端口

4.显示某进程现在打开的文件
lsof -c 进程

本文来源:
https://www.zonghengcloud.com/article/9197.html
[复制链接]
链接已复制