Created
April 5, 2017 16:07
-
-
Save michaelwclark/18b2c462bc28a24f03006f9335a3943e to your computer and use it in GitHub Desktop.
OSX El Capitan+ Kill process listening on port.
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
| function killPort(){ | |
| lsof -i tcp:$1 | awk '{print $2}' | grep -v 'PID' | xargs kill | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment