rpm -qa --qf '%{name}'

To get the different name field nformation on rpm packages


0
By: mnikhil
2009-02-07 18:42:32
rpm

These Might Interest You

  • The $2, $3, $4 fields are arbitrary but note that the first field starts from $2 and the last field is $NF-1. This is due to the fact that the leading and trailing quotes are treated as field delimiters. Show Sample Output


    7
    awk -F'^"|", "|"$' '{ print $2,$3,$4 }' file.csv
    SiegeX · 2009-02-16 21:32:46 0
  • Shows the packages installed on your system that are recomemnded by other packages. You should remove these packages. Show Sample Output


    1
    aptitude search '?and( ?automatic(?reverse-recommends(?installed)), ?not(?automatic(?reverse-depends(?installed))) )'
    wei2912 · 2012-07-28 05:45:21 0
  • This command lists all packages in a yum based system that no other packages depend on. Hence, these packages are good candidates for removal. It's a great command for cleaning up a yum based distribution after installation. Show Sample Output


    0
    package-cleanup --leaves --all
    drebes · 2009-02-05 13:51:27 0
  • After you install/remove lots of packages, there are many packages marked with 'rc'. This script help you to purge these packages, it will save some spaces from your disk.


    2
    sudo dpkg --purge `dpkg -l | awk '/^r/{print $2}'`
    elleryq · 2009-02-16 02:18:02 3
  • I sometimes want to know what packages are installed on my Ubuntu system. I still haven't figured out how to use aptitude effectively, so this is the next best thing. This allows finding by name. The grep '^ii' limits the display to only installed packages. If this is not specified, then it includes listing of non-installed packages as well. Show Sample Output


    1
    dpkg --list '*linux*' | grep '^ii'
    piyo · 2009-02-13 17:05:37 1
  • Awk replaces the value of a specific field while retaining the field separator "/" . Show Sample Output


    1
    echo /home/foo/dir1/bar | awk -F/ -v OFS=/ '{$3 = "dir2"}1'
    zlemini · 2012-10-26 16:17:20 0

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: