Skip to content

Instantly share code, notes, and snippets.

@RichardWarburton
Last active August 29, 2015 13:56
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 RichardWarburton/9344158 to your computer and use it in GitHub Desktop.
Save RichardWarburton/9344158 to your computer and use it in GitHub Desktop.
Jar Size Analysis
# Convert
find | grep ".jar$" | grep -v 'tiny' | while read file; do gzip --keep $file; done
find | grep "\.jar$" | grep -v 'tiny' | while read file; do bzip2 --keep $file; done
# Dump
find | grep ".jar$" | grep -v 'tiny' | xargs ls -l | grep -P "$1" | awk '{ print $5 }' > jar_sizes
find | grep "tiny.jar$" | xargs ls -l | grep -P "$1" | awk '{ print $5 }' > tiny_jar_sizes
# Process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment