Useful command line for diagnostication purpose

The command below creates a list of IP addresses connected to the server, along with their total number of connections:

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
netstat -tan | grep LISTEN |grep -v 127.0.0.1 | awk '{ print $1,$4,$5}' | sort

 

windows
netstat -aon |find /i "listening" |find "port"

Search String inside files

grep -rnw '/folder/' -e 'string to look for '

This entry was posted in Tools, Useful command line. Bookmark the permalink.

Leave a Reply