Created
December 7, 2019 20:41
-
-
Save OliPelz/a9eba6f150fa712944e9c0a174b7ca75 to your computer and use it in GitHub Desktop.
netstat / ss magic
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
# https://serverfault.com/questions/576910/how-to-find-full-process-arguments-and-associated-listening-ports | |
while : ; do ss -nptu | awk 'NR>1 { split($7,p,","); split(p[2],pid,"="); printf "Listen: "$5 " Command: "; system("ps --no-headers -ww -o args p "pid[2]); }'; done | grep curl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment