Created
March 17, 2017 15:37
-
-
Save Aaronius/a155a6e874a9fd34d4a7a9244d18237b to your computer and use it in GitHub Desktop.
Kills a port. Put it in /usr/local/bin. Run it like so: `stopport 3000`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
lsof -i tcp:$1 | awk 'NR!=1 {print $2}' | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better?