lsof
CLIList open files and the processes that opened them.
1 views
Installation
Homebrew
brew install lsofapt
sudo apt install lsofLinks
License
SMAILAI Agent Notes
Find which process has a file or port open
When to use
Debugging 'port in use' errors or finding processes holding files
Examples
lsof -i :3000 # what's using port 3000lsof -p 1234 # files opened by PIDlsof /var/log/app.log # who has this file open
Proven Recipes
Find process using a port🟢 99% success
lsof -i :PORT -sTCP:LISTEN