Sort installed rpms in alphabetic order with their size.

rpm -qa --qf "%-30{NAME} %-10{SIZE}\n" | sort -n | less
Sample Output
a2ps                           4133457   
a52dec                         111471    
aalib-libs                     158834    
abrt                           620447    
abrt-addon-ccpp                54439     
abrt-addon-kerneloops          62589     
abrt-addon-python              33043     
abrt-desktop                   0         
abrt-gui                       330522    
abrt-libs                      94632     
abrt-plugin-bugzilla           53295     
abrt-plugin-logger             21107     
abrt-plugin-runapp             10154     
acl                            188572    
acpid                          74381     
AdobeReader_enu                151034561 
adobe-release-i386             1905      
agg                            357641    
agg-devel                      2594505   
aiksaurus                      601798    
[...]

2
2010-04-14 07:30:37

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: