Linux all open ports: netstat -ntlp | grep LISTEN Mac git diff lines: git diff --stat `git hash-object -t tree /dev/null` | tail -1