Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeilHanlon/98cf1148a726fb93fd725f1c89d19880 to your computer and use it in GitHub Desktop.
Save NeilHanlon/98cf1148a726fb93fd725f1c89d19880 to your computer and use it in GitHub Desktop.
:oc:du::du -sk * | sort -rn | awk '{{}out=$2; for(i=3;i<=NF;i{+}{+}){{}out=out" "$i{}}; print out{}}' | xargs -ia du -hs "a"
:oc:tcpcount::netstat -plan|grep :80|awk {{}'print $5'{}}|cut -d: -f 1|sort|uniq -c|sort -nk 1
:oc:udptcp::netstat -anp |grep 'tcp\|udp' | awk '{{}print $5{}}' | cut -d: -f1 | sort | uniq -c | sort -n
:oc:estab::netstat -ntu | grep ESTAB | awk '{{}print $5{}}' | cut -d: -f1 | sort | uniq -c | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment