Skip to content

Instantly share code, notes, and snippets.

@skarfacegc
Last active December 15, 2015 06:09
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 skarfacegc/5214453 to your computer and use it in GitHub Desktop.
Save skarfacegc/5214453 to your computer and use it in GitHub Desktop.
Random useful shell commands
# list current network connections and refrsh every 2 seconds
watch "lsof -i -P |grep ESTABLISHED |awk '{printf \"%15.15s \\t%s\\n\", \$1, \$9}'"
# Show the number of commits per file
find . -type f -exec sh -c "echo {} ;git log --pretty=oneline {} |wc -l" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment