lsof is a tool to list open files of processes

learn more… | top users | synonyms

27
votes
5answers
6k views

Who's got the other end of this unix socketpair?

I want to determine which process has the other end of a UNIX socket. Specifically, I'm asking about one that was created with socketpair(), though the problem is the same for any UNIX socket. I ...
0
votes
3answers
286 views

How do I detect running processes using a library package?

This command is doing the rounds for detecting currently running processes using glibc: lsof | grep libc | awk '{print $2}' | sort | uniq I find it intensely annoying, since /libc/ matches not only ...
3
votes
3answers
12k views

How to interpret this output of lsof command?

root@host [/home2]# lsof /home2 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME php 3182 ctxmortg cwd DIR 8,17 4096 32858196 /home2/ctxmortg/public_html/hello php ...
1
vote
2answers
2k views

lsof: show files open as read-write

When I try to remount a partition as read-only, I get an error /foo is busy. I can list all files open from /foo with lsof /foo but that does not show me whether files are open read-only or ...