The lsof command
list open files 3 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Examples
sudo lsof -i :80The same question, asked of one port
sudo lsof +L1Open files that were deleted (link count 0)
sudo lsof | grep deletedThe same, the long way