aboutsummaryrefslogtreecommitdiff
path: root/programSizes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'programSizes.sh')
-rwxr-xr-xprogramSizes.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/programSizes.sh b/programSizes.sh
new file mode 100755
index 0000000..f892497
--- /dev/null
+++ b/programSizes.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# programSizes.sh
+#
+# Outputs the sizes of programs installed by pacman ordered by size.
+
+for program in $(pacman -Q | cut -d' ' -f1); do
+ pacman -Qi "$program" | grep -E '(^Name|^Installed Size)'
+done |
+ sed '/^Name/{
+ N
+ s/Name\s*: //
+ s/\nInstalled Size\s*://
+ s/\([0-9]\) \([^0-9]\)/\1\2/
+ s/\([^ ]* \)\(.*\)/\2 \1/}' |
+ sort -h
+