Skip to content

Instantly share code, notes, and snippets.

@sam
Created January 20, 2012 02:31
Show Gist options
  • Save sam/1644593 to your computer and use it in GitHub Desktop.
Save sam/1644593 to your computer and use it in GitHub Desktop.
Count Sources
find . \
-type d -name .git -prune \
-o -type f -name '*.gz' -prune \
-o -type f -name '*.tgz' -prune \
-o -type f -name '*.conf' -prune \
-o -type f -exec wc -l {} \; | awk '{ SUM += $1 + 1 } END {print SUM}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment