lsof 查看打开了一个文件的有哪些进程 统计那个进程打开的文件最多

lsof | grep /lib64/libc-2.12.so | wc   == 查看打开了一个文件的有哪些进程

image

lsof | awk '{print $2,$1}' | sort | uniq -c | sort -rn | less  == 统计那个进程打开的文件最多

image

原文地址:https://www.cnblogs.com/fepapa/p/5395729.html