I have an app running (let's call it MySpecialWebServer.app). While I have a GUI way to find out what port it's listening for requests on, I'd like to find out using the command line. I really have no idea how to go about it :)
will show you a list of all open connections.
will show you a list of all ports being listened on. The left most column indicates the process listening.