Created
March 13, 2013 15:33
-
-
Save mrnovalles/5153264 to your computer and use it in GitHub Desktop.
check processes listening on port
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
for i in `netstat -na |grep LISTEN |grep -v unix | tr -s ' ' | cut -d " " -f 4 |awk -F. '{print $NF}'`; do echo -e "\n*** Process listening on port $i: ***\n"; sudo lsof -i :$i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By @chrisavl