Created
March 15, 2023 22:15
-
-
Save schigh-ntwrk/db2f1ce19b7640ccff0dbad278ad9be9 to your computer and use it in GitHub Desktop.
MacOS zshell func to show who is using what port (not mine, but i forgot where I stole it from)
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
# check to see who is using what port | |
function macnst (){ | |
netstat -Watnlv | grep LISTEN | awk '{"ps -o comm= -p " $9 | getline procname;colred="\033[01;31m";colclr="\033[0m"; print colred "proto: " colclr $1 colred " | addr.port: " colclr $4 colred " | pid: " colclr $9 colred " | name: " colclr procname; }' | column -t -s "|" | |
} |
Author
schigh-ntwrk
commented
Mar 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment