29
I'm trying to determine what application is using certain port and get netstat -tlnp | grep <port> for Linux.
This command return the following output:
(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:<port> 0.0.0.0:* LISTEN 3591/java
I need to get in result only name of the process and PID, i.e java 3591.
What is best way to do it?
Thank you.