Skip to content

Instantly share code, notes, and snippets.

@dispeakble
Created July 17, 2021 15:40
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 dispeakble/b9750a4e7ada3017660ff5644263cf90 to your computer and use it in GitHub Desktop.
Save dispeakble/b9750a4e7ada3017660ff5644263cf90 to your computer and use it in GitHub Desktop.
gist for listing all file lines of code for some file types and exclude directories
find . -name "*.js" -not -path "*node_modules*" | xargs wc -l
find . -name "*.ts" -not -path "*node_modules*" | xargs wc -l
find . -name "*.js" -not -path "*public*" | xargs wc -l
find . -name "*.js" -not -path "*dist*" | xargs wc -l
# and all together
find . -name "*.js" -not -path "*node_modules*" -not -path "./public*" -not -path "./dist*" | xargs wc -l
find . -name "*.js" . -name "*.ts" -not -path "*node_modules*" -not -path "./public*" -not -path "./dist*" | xargs wc -l
find . -type f \( -iname "*.js" -o -iname "*.ts" \) -not -path "*/node_modules/*" -not -path "*/public/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment