dmiessler.com | study | lsof:
lsof is the Linux/Unix Ã¼ber-tool. I use it most for getting network connection related information from a system, but that’s just the beginning for this amazing and little-known application. The tool is aptly called lsof because it “lists open files”. And remember, in Unix just about everything (including a network socket) is a file.
handy primer on lsof