one-liners

=Awesome one-liners:= toc

Sort IPs in a file:
code format="bash" sort -n -t. -k 1,1 -k 2,2 -k 3,3 -k 4,4 fileofIPs code

IP's being connected to, sorted by # of Connections to server:
code netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -rn code

Solaris - display all running processes and the ports they use if any
code format="bash" pfiles `ptree | awk '{print $1}'` | egrep '^[0-9]|port:' code

x