mercredi 7 mars 2012

Mageia sort packages by size

rpm -qa --queryformat='%{SIZE} \t %{NAME}%{VERSION}%{RELEASE}\n' | sort -n | awk '{printf  "%-12s% -40s  \n", $1,$2}'

ou

rpm -qa --queryformat='%{SIZE}\t%{NAME}%{VERSION}%{RELEASE} %{SUMMARY}\n' | sort -n

ou

rpm -qa --queryformat='%{SIZE} \t %{NAME}%{VERSION} %{SUMMARY}\n' | sort -n |  awk '{printf  "%-0.1f Mb %-10s  \n", $1/1048576,$2}'