Show networking on a port
lsof -iTCP -i :port lsof -i :22
Show connections to a host
lsof [email protected]8.1.5
Find ports that are being listened to
lsof -i | grep LISTEN
Find files open by user
lsof -u <user>
Find files open by command
lsof -c <command>
Find files open by proccess id
lsof -p <pid>