lsof -iTCP -i :port
lsof -i :22
** Show connections to a host **
lsof -i@192.168.1.5
** Find ports that are being listened to **
lsof -i | grep LISTEN
** Find files open by user **
lsof -u
** Find files open by command **
lsof -c
** Find files open by proccess id **
lsof -p