Skip to content

Instantly share code, notes, and snippets.

@tjjfvi
Created October 10, 2018 22:09
Show Gist options
  • Save tjjfvi/8812aac41afc9cbf45e7e34b476795d2 to your computer and use it in GitHub Desktop.
Save tjjfvi/8812aac41afc9cbf45e7e34b476795d2 to your computer and use it in GitHub Desktop.
*nix Bash Kill By Port
#!/usr/bin/env bash
kill `netstat -tulpn | grep :$1 | sed -e "s/.*LISTEN *//" -e 's/\/.*//'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment