Skip to content

Instantly share code, notes, and snippets.

@tuergeist
Created September 8, 2016 12:39
Show Gist options
  • Select an option

  • Save tuergeist/b51564e1613652eeba664a534f6df36d to your computer and use it in GitHub Desktop.

Select an option

Save tuergeist/b51564e1613652eeba664a534f6df36d to your computer and use it in GitHub Desktop.
Kill all processes that appear to listen to a specific port
PORT=10514
while n=$(netstat -tupln | grep $PORT | egrep -oh '(([0-9]*))\/' | grep -oh '[0-9]*') ; do kill $n ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment