Skip to content

Instantly share code, notes, and snippets.

@Buggytheclown
Created January 3, 2019 14:53
Show Gist options
  • Select an option

  • Save Buggytheclown/d3a51ec38406e4c29c8a7d12171ab2ac to your computer and use it in GitHub Desktop.

Select an option

Save Buggytheclown/d3a51ec38406e4c29c8a7d12171ab2ac to your computer and use it in GitHub Desktop.
bash analytics
# Find top 30 the most wanted files sorted by commit count
git log --name-only --pretty=format: src | sort | uniq -c | sort -nr | head -n 30
# Find top 10 the largest '*.js' files sorted by size
find . -name '*.js' -type f -ls | sort -k7 -r | head -n 20
# count lines of code, without directory 'migrations'
find . -name migrations -prune -o -name '*.ts' | xargs wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment