From: Wolfgang Meister on
How can I list all local ports where a local server or services is listening?

The listing should contain the path and program name of the listening server/service.

So I need something like:

port=22 /lib/svc/method/sshd
port=25 /bin/emailprgm
....
port=1049 /ust/local/bin/myserver

How can I do this?

Wolfgang