Created
July 19, 2023 02:22
-
-
Save sh1nj1/e88812b85f2cf323b5c71127af5fed7c to your computer and use it in GitHub Desktop.
Get PID by listening port number in Mac OS X
This file contains 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/sh | |
lsof -nP -iTCP -sTCP:LISTEN | grep $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment