Skip to content

Instantly share code, notes, and snippets.

@breard-r
Created March 19, 2019 17:30
Show Gist options
  • Select an option

  • Save breard-r/dbec94bbce53b4175287679c6481d42f to your computer and use it in GitHub Desktop.

Select an option

Save breard-r/dbec94bbce53b4175287679c6481d42f to your computer and use it in GitHub Desktop.
cargo tree --no-indent | cut -d ' ' -f1,2 | sed 's/ v/-/' | sort | uniq | while read -r name ; do size=$(stat --printf="%s" "$(find "$HOME/.cargo/registry/cache/" -mindepth 1 -maxdepth 1 -print)/$name.crate"); printf "%07d %s\n" "$size" "$name"; done | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment