Skip to content

Instantly share code, notes, and snippets.

@mrnovalles
Created March 13, 2013 15:33
Show Gist options
  • Save mrnovalles/5153264 to your computer and use it in GitHub Desktop.
Save mrnovalles/5153264 to your computer and use it in GitHub Desktop.
check processes listening on port
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
@mrnovalles
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment