Created
October 26, 2017 08:13
-
-
Save danielneal/17c493b6ffc4b4bbb899e7d38192b30c to your computer and use it in GitHub Desktop.
portpid
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
# Show the process that is listening on the port | |
portpid () { | |
lsof -i 4tcp:$1 -sTCP:LISTEN -Fp | cut -c 2- | |
} | |
# thanks @bronsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment