|
List Open Files with lsof |
|
Wednesday, 07 March 2007 |
| | | | | List Open Files (lsof) | | | | | | | | | | | | | | The lsof program is a great tool to find open files. One case you might need this is to find a process that has an open file on a device you are trying to unmount. List your own open files (includes sockets and pipes): lsof List all open files on the system (includes sockets and pipes), as root: lsof List open files for certain processes, as root: lsof -c pattern where pattern is the first few letters of the process name or a regular expression between forward slashes /regexp/. List all open network sockets, as root: lsof -i Useful to make sure something unexpected isn't listening to the network. | | | | | | | | | | | | | | |
|