lsof do?list open files (and the processes that hold them open).
▸ Explain your own lsof command →$ lsof -i :8080
$ lsof -p 1234
$ lsof -nP -i tcp
| -i | list network files — optionally filtered, e.g. -i :8080, -i tcp:80 |
| -p | restrict to the given process ID(s) |
| -u | restrict to files opened by the given user(s) |
| -c | restrict to processes whose name begins with this string |
| -n | don't resolve host names — numeric addresses (faster) |
| -P | don't resolve port names — numeric ports (faster) |
| -t | terse output — print only process IDs (handy for scripting) |
| -a | AND the selection filters together instead of OR-ing them |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.