Created
January 17, 2015 20:41
-
-
Save kathawala/43d44a3b13e841e00b65 to your computer and use it in GitHub Desktop.
Prints out a list of all pacman packages sorted by size from largest to smallest
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
#!/bin/bash | |
( echo "PACKAGE SIZE(K)"; | |
for A in /var/lib/pacman/local/*/desc; do | |
egrep -A1 '%(NAME|SIZE)' $A \ | |
| gawk '/^[a-z]/ { printf "%s ", $1 }; /^[0-9]/ { printf "%.0f\n", $1/1024 }' | |
done | sort -nrk2 ) | column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment