Skip to content

Instantly share code, notes, and snippets.

@jepio
Last active August 29, 2015 14:01
Show Gist options
  • Save jepio/8780a4b3ef34dfcd4325 to your computer and use it in GitHub Desktop.
Save jepio/8780a4b3ef34dfcd4325 to your computer and use it in GitHub Desktop.
A shell script to find out what's hogging all your disk space in gentoo. Requires gentoolkit but everyone has that already anyway...
#!/usr/bin/env bash
# print a size sorted list
# of all programs installed
#
## equery s '*' | sed 's/(\|)/ /g' | sort -n -k 9 | gawk '{printf("%s %.3gMB\n",$1,$9/1048576)}'
# this version is much faster:
qsize -asm | sed 's/,//g' | sort -n -k 6 | awk '{printf "%dMB %s\n",$6,$1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment