I was wondering, is there any way to kill a process that is running on a specific IP and port on Ubuntu 14.04 on a local IP and port? Preferably, this would be in one command, but if not, a bash script would be perfectly fine as well.
There are likely cleaner ways, but something along the lines of:
netstat -lnp | grep 'tcp .*127.0.0.1:9984' | sed -e 's/.*LISTEN *//' -e 's#/.*##' | xargs kill
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments