Created
December 23, 2018 21:20
-
-
Save petersjt014/d6cf1c30fef45269ef8c079419c6016e to your computer and use it in GitHub Desktop.
finds the total size of a nix closure, taking into account both shared paths and my fear of variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $@ | xargs -I _ bash -c "which _" | xargs -I _ nix-store -qR _ | sort | uniq | xargs -I _ du -sk _ | cut -f1 | paste -sd+ | xargs -I _ bash -c 'bc -l <<< "(_)/1024"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment