lsof <filename> # gets processes with that file open
lsof -p <pid> # list all files open by process <pid>
lsof -u username # list all files open by user username
lsof -i :80 # which processes are listening on port 80
lsof -i tcp
lsof -i udp