LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2011, 12:33 AM   #1
maobin
Member
 
Registered: Feb 2011
Posts: 42

Rep: Reputation: 0
Using rpm -qa


Hi,
does any one have any idea how can I find the location of the files I listed using rpm -qa?

eg,
1 of the result returned from rpm -qa is yum-3.2.22-20.el5 how can I find the location of this program?
 
Old 02-25-2011, 01:04 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
Code:
rpm -ql yum-3.2.22-20.el5
'yum' isn't just one program, though.

And if you used the 'yum -qa' output in a for loop, you'd end up printing a massive number of files and their locations...

Code:
[root@athlonz ~]# rpm -ql yum-3.2.24-2.fc10.noarch
/etc/logrotate.d/yum
/etc/yum
/etc/yum.conf
/etc/yum.repos.d
/etc/yum/pluginconf.d
/usr/bin/yum
/usr/lib/python2.5/site-packages/rpmUtils
/usr/lib/python2.5/site-packages/rpmUtils/__init__.py
/usr/lib/python2.5/site-packages/rpmUtils/__init__.pyc
/usr/lib/python2.5/site-packages/rpmUtils/__init__.pyo
/usr/lib/python2.5/site-packages/rpmUtils/arch.py
/usr/lib/python2.5/site-packages/rpmUtils/arch.pyc
/usr/lib/python2.5/site-packages/rpmUtils/arch.pyo
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.py
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.pyc
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.pyo
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.py
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.pyc
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.pyo
/usr/lib/python2.5/site-packages/rpmUtils/transaction.py
/usr/lib/python2.5/site-packages/rpmUtils/transaction.pyc
/usr/lib/python2.5/site-packages/rpmUtils/transaction.pyo
/usr/lib/python2.5/site-packages/rpmUtils/updates.py
/usr/lib/python2.5/site-packages/rpmUtils/updates.pyc
/usr/lib/python2.5/site-packages/rpmUtils/updates.pyo
/usr/lib/python2.5/site-packages/yum
/usr/lib/python2.5/site-packages/yum/Errors.py
/usr/lib/python2.5/site-packages/yum/Errors.pyc
/usr/lib/python2.5/site-packages/yum/Errors.pyo
/usr/lib/python2.5/site-packages/yum/__init__.py
/usr/lib/python2.5/site-packages/yum/__init__.pyc
/usr/lib/python2.5/site-packages/yum/__init__.pyo
/usr/lib/python2.5/site-packages/yum/callbacks.py
/usr/lib/python2.5/site-packages/yum/callbacks.pyc
/usr/lib/python2.5/site-packages/yum/callbacks.pyo
/usr/lib/python2.5/site-packages/yum/comps.py
/usr/lib/python2.5/site-packages/yum/comps.pyc
/usr/lib/python2.5/site-packages/yum/comps.pyo
/usr/lib/python2.5/site-packages/yum/config.py
/usr/lib/python2.5/site-packages/yum/config.pyc
/usr/lib/python2.5/site-packages/yum/config.pyo
/usr/lib/python2.5/site-packages/yum/constants.py
/usr/lib/python2.5/site-packages/yum/constants.pyc
/usr/lib/python2.5/site-packages/yum/constants.pyo
/usr/lib/python2.5/site-packages/yum/depsolve.py
/usr/lib/python2.5/site-packages/yum/depsolve.pyc
/usr/lib/python2.5/site-packages/yum/depsolve.pyo
/usr/lib/python2.5/site-packages/yum/failover.py
/usr/lib/python2.5/site-packages/yum/failover.pyc
/usr/lib/python2.5/site-packages/yum/failover.pyo
/usr/lib/python2.5/site-packages/yum/i18n.py
/usr/lib/python2.5/site-packages/yum/i18n.pyc
/usr/lib/python2.5/site-packages/yum/i18n.pyo
/usr/lib/python2.5/site-packages/yum/logginglevels.py
/usr/lib/python2.5/site-packages/yum/logginglevels.pyc
/usr/lib/python2.5/site-packages/yum/logginglevels.pyo
/usr/lib/python2.5/site-packages/yum/mdparser.py
/usr/lib/python2.5/site-packages/yum/mdparser.pyc
/usr/lib/python2.5/site-packages/yum/mdparser.pyo
/usr/lib/python2.5/site-packages/yum/metalink.py
/usr/lib/python2.5/site-packages/yum/metalink.pyc
/usr/lib/python2.5/site-packages/yum/metalink.pyo
/usr/lib/python2.5/site-packages/yum/misc.py
/usr/lib/python2.5/site-packages/yum/misc.pyc
/usr/lib/python2.5/site-packages/yum/misc.pyo
/usr/lib/python2.5/site-packages/yum/packageSack.py
/usr/lib/python2.5/site-packages/yum/packageSack.pyc
/usr/lib/python2.5/site-packages/yum/packageSack.pyo
/usr/lib/python2.5/site-packages/yum/packages.py
/usr/lib/python2.5/site-packages/yum/packages.pyc
/usr/lib/python2.5/site-packages/yum/packages.pyo
/usr/lib/python2.5/site-packages/yum/parser.py
/usr/lib/python2.5/site-packages/yum/parser.pyc
/usr/lib/python2.5/site-packages/yum/parser.pyo
/usr/lib/python2.5/site-packages/yum/pgpmsg.py
/usr/lib/python2.5/site-packages/yum/pgpmsg.pyc
/usr/lib/python2.5/site-packages/yum/pgpmsg.pyo
/usr/lib/python2.5/site-packages/yum/plugins.py
/usr/lib/python2.5/site-packages/yum/plugins.pyc
/usr/lib/python2.5/site-packages/yum/plugins.pyo
/usr/lib/python2.5/site-packages/yum/repoMDObject.py
/usr/lib/python2.5/site-packages/yum/repoMDObject.pyc
/usr/lib/python2.5/site-packages/yum/repoMDObject.pyo
/usr/lib/python2.5/site-packages/yum/repos.py
/usr/lib/python2.5/site-packages/yum/repos.pyc
/usr/lib/python2.5/site-packages/yum/repos.pyo
/usr/lib/python2.5/site-packages/yum/rpmsack.py
/usr/lib/python2.5/site-packages/yum/rpmsack.pyc
/usr/lib/python2.5/site-packages/yum/rpmsack.pyo
/usr/lib/python2.5/site-packages/yum/rpmtrans.py
/usr/lib/python2.5/site-packages/yum/rpmtrans.pyc
/usr/lib/python2.5/site-packages/yum/rpmtrans.pyo
/usr/lib/python2.5/site-packages/yum/sqlitesack.py
/usr/lib/python2.5/site-packages/yum/sqlitesack.pyc
/usr/lib/python2.5/site-packages/yum/sqlitesack.pyo
/usr/lib/python2.5/site-packages/yum/sqlutils.py
/usr/lib/python2.5/site-packages/yum/sqlutils.pyc
/usr/lib/python2.5/site-packages/yum/sqlutils.pyo
/usr/lib/python2.5/site-packages/yum/transactioninfo.py
/usr/lib/python2.5/site-packages/yum/transactioninfo.pyc
/usr/lib/python2.5/site-packages/yum/transactioninfo.pyo
/usr/lib/python2.5/site-packages/yum/update_md.py
/usr/lib/python2.5/site-packages/yum/update_md.pyc
/usr/lib/python2.5/site-packages/yum/update_md.pyo
/usr/lib/python2.5/site-packages/yum/yumRepo.py
/usr/lib/python2.5/site-packages/yum/yumRepo.pyc
/usr/lib/python2.5/site-packages/yum/yumRepo.pyo
/usr/lib/yum-plugins
/usr/share/doc/yum-3.2.24
/usr/share/doc/yum-3.2.24/AUTHORS
/usr/share/doc/yum-3.2.24/COPYING
/usr/share/doc/yum-3.2.24/ChangeLog
/usr/share/doc/yum-3.2.24/INSTALL
/usr/share/doc/yum-3.2.24/README
/usr/share/doc/yum-3.2.24/TODO
/usr/share/locale/ca/LC_MESSAGES/yum.mo
/usr/share/locale/da/LC_MESSAGES/yum.mo
/usr/share/locale/de/LC_MESSAGES/yum.mo
/usr/share/locale/es/LC_MESSAGES/yum.mo
/usr/share/locale/fr/LC_MESSAGES/yum.mo
/usr/share/locale/it/LC_MESSAGES/yum.mo
/usr/share/locale/ja/LC_MESSAGES/yum.mo
/usr/share/locale/ms/LC_MESSAGES/yum.mo
/usr/share/locale/nb/LC_MESSAGES/yum.mo
/usr/share/locale/pl/LC_MESSAGES/yum.mo
/usr/share/locale/pt/LC_MESSAGES/yum.mo
/usr/share/locale/pt_BR/LC_MESSAGES/yum.mo
/usr/share/locale/ru/LC_MESSAGES/yum.mo
/usr/share/locale/sr/LC_MESSAGES/yum.mo
/usr/share/locale/sr@latin/LC_MESSAGES/yum.mo
/usr/share/locale/sv/LC_MESSAGES/yum.mo
/usr/share/locale/zh_CN/LC_MESSAGES/yum.mo
/usr/share/man/man5/yum.conf.5.gz
/usr/share/man/man8/yum-shell.8.gz
/usr/share/man/man8/yum.8.gz
/usr/share/yum-cli
/usr/share/yum-cli/callback.py
/usr/share/yum-cli/callback.pyc
/usr/share/yum-cli/callback.pyo
/usr/share/yum-cli/cli.py
/usr/share/yum-cli/cli.pyc
/usr/share/yum-cli/cli.pyo
/usr/share/yum-cli/output.py
/usr/share/yum-cli/output.pyc
/usr/share/yum-cli/output.pyo
/usr/share/yum-cli/shell.py
/usr/share/yum-cli/shell.pyc
/usr/share/yum-cli/shell.pyo
/usr/share/yum-cli/utils.py
/usr/share/yum-cli/utils.pyc
/usr/share/yum-cli/utils.pyo
/usr/share/yum-cli/yumcommands.py
/usr/share/yum-cli/yumcommands.pyc
/usr/share/yum-cli/yumcommands.pyo
/usr/share/yum-cli/yummain.py
/usr/share/yum-cli/yummain.pyc
/usr/share/yum-cli/yummain.pyo
/var/cache/yum
/var/lib/yum
[root@athlonz ~]#

Last edited by tommylovell; 02-25-2011 at 01:06 AM.
 
1 members found this post helpful.
Old 02-25-2011, 01:26 AM   #3
maobin
Member
 
Registered: Feb 2011
Posts: 42

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tommylovell View Post
Code:
rpm -ql yum-3.2.22-20.el5
'yum' isn't just one program, though.

And if you used the 'yum -qa' output in a for loop, you'd end up printing a massive number of files and their locations...

Code:
[root@athlonz ~]# rpm -ql yum-3.2.24-2.fc10.noarch
/etc/logrotate.d/yum
/etc/yum
/etc/yum.conf
/etc/yum.repos.d
/etc/yum/pluginconf.d
/usr/bin/yum
/usr/lib/python2.5/site-packages/rpmUtils
/usr/lib/python2.5/site-packages/rpmUtils/__init__.py
/usr/lib/python2.5/site-packages/rpmUtils/__init__.pyc
/usr/lib/python2.5/site-packages/rpmUtils/__init__.pyo
/usr/lib/python2.5/site-packages/rpmUtils/arch.py
/usr/lib/python2.5/site-packages/rpmUtils/arch.pyc
/usr/lib/python2.5/site-packages/rpmUtils/arch.pyo
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.py
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.pyc
/usr/lib/python2.5/site-packages/rpmUtils/miscutils.pyo
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.py
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.pyc
/usr/lib/python2.5/site-packages/rpmUtils/oldUtils.pyo
/usr/lib/python2.5/site-packages/rpmUtils/transaction.py
/usr/lib/python2.5/site-packages/rpmUtils/transaction.pyc
/usr/lib/python2.5/site-packages/rpmUtils/transaction.pyo
/usr/lib/python2.5/site-packages/rpmUtils/updates.py
/usr/lib/python2.5/site-packages/rpmUtils/updates.pyc
/usr/lib/python2.5/site-packages/rpmUtils/updates.pyo
/usr/lib/python2.5/site-packages/yum
/usr/lib/python2.5/site-packages/yum/Errors.py
/usr/lib/python2.5/site-packages/yum/Errors.pyc
/usr/lib/python2.5/site-packages/yum/Errors.pyo
/usr/lib/python2.5/site-packages/yum/__init__.py
/usr/lib/python2.5/site-packages/yum/__init__.pyc
/usr/lib/python2.5/site-packages/yum/__init__.pyo
/usr/lib/python2.5/site-packages/yum/callbacks.py
/usr/lib/python2.5/site-packages/yum/callbacks.pyc
/usr/lib/python2.5/site-packages/yum/callbacks.pyo
/usr/lib/python2.5/site-packages/yum/comps.py
/usr/lib/python2.5/site-packages/yum/comps.pyc
/usr/lib/python2.5/site-packages/yum/comps.pyo
/usr/lib/python2.5/site-packages/yum/config.py
/usr/lib/python2.5/site-packages/yum/config.pyc
/usr/lib/python2.5/site-packages/yum/config.pyo
/usr/lib/python2.5/site-packages/yum/constants.py
/usr/lib/python2.5/site-packages/yum/constants.pyc
/usr/lib/python2.5/site-packages/yum/constants.pyo
/usr/lib/python2.5/site-packages/yum/depsolve.py
/usr/lib/python2.5/site-packages/yum/depsolve.pyc
/usr/lib/python2.5/site-packages/yum/depsolve.pyo
/usr/lib/python2.5/site-packages/yum/failover.py
/usr/lib/python2.5/site-packages/yum/failover.pyc
/usr/lib/python2.5/site-packages/yum/failover.pyo
/usr/lib/python2.5/site-packages/yum/i18n.py
/usr/lib/python2.5/site-packages/yum/i18n.pyc
/usr/lib/python2.5/site-packages/yum/i18n.pyo
/usr/lib/python2.5/site-packages/yum/logginglevels.py
/usr/lib/python2.5/site-packages/yum/logginglevels.pyc
/usr/lib/python2.5/site-packages/yum/logginglevels.pyo
/usr/lib/python2.5/site-packages/yum/mdparser.py
/usr/lib/python2.5/site-packages/yum/mdparser.pyc
/usr/lib/python2.5/site-packages/yum/mdparser.pyo
/usr/lib/python2.5/site-packages/yum/metalink.py
/usr/lib/python2.5/site-packages/yum/metalink.pyc
/usr/lib/python2.5/site-packages/yum/metalink.pyo
/usr/lib/python2.5/site-packages/yum/misc.py
/usr/lib/python2.5/site-packages/yum/misc.pyc
/usr/lib/python2.5/site-packages/yum/misc.pyo
/usr/lib/python2.5/site-packages/yum/packageSack.py
/usr/lib/python2.5/site-packages/yum/packageSack.pyc
/usr/lib/python2.5/site-packages/yum/packageSack.pyo
/usr/lib/python2.5/site-packages/yum/packages.py
/usr/lib/python2.5/site-packages/yum/packages.pyc
/usr/lib/python2.5/site-packages/yum/packages.pyo
/usr/lib/python2.5/site-packages/yum/parser.py
/usr/lib/python2.5/site-packages/yum/parser.pyc
/usr/lib/python2.5/site-packages/yum/parser.pyo
/usr/lib/python2.5/site-packages/yum/pgpmsg.py
/usr/lib/python2.5/site-packages/yum/pgpmsg.pyc
/usr/lib/python2.5/site-packages/yum/pgpmsg.pyo
/usr/lib/python2.5/site-packages/yum/plugins.py
/usr/lib/python2.5/site-packages/yum/plugins.pyc
/usr/lib/python2.5/site-packages/yum/plugins.pyo
/usr/lib/python2.5/site-packages/yum/repoMDObject.py
/usr/lib/python2.5/site-packages/yum/repoMDObject.pyc
/usr/lib/python2.5/site-packages/yum/repoMDObject.pyo
/usr/lib/python2.5/site-packages/yum/repos.py
/usr/lib/python2.5/site-packages/yum/repos.pyc
/usr/lib/python2.5/site-packages/yum/repos.pyo
/usr/lib/python2.5/site-packages/yum/rpmsack.py
/usr/lib/python2.5/site-packages/yum/rpmsack.pyc
/usr/lib/python2.5/site-packages/yum/rpmsack.pyo
/usr/lib/python2.5/site-packages/yum/rpmtrans.py
/usr/lib/python2.5/site-packages/yum/rpmtrans.pyc
/usr/lib/python2.5/site-packages/yum/rpmtrans.pyo
/usr/lib/python2.5/site-packages/yum/sqlitesack.py
/usr/lib/python2.5/site-packages/yum/sqlitesack.pyc
/usr/lib/python2.5/site-packages/yum/sqlitesack.pyo
/usr/lib/python2.5/site-packages/yum/sqlutils.py
/usr/lib/python2.5/site-packages/yum/sqlutils.pyc
/usr/lib/python2.5/site-packages/yum/sqlutils.pyo
/usr/lib/python2.5/site-packages/yum/transactioninfo.py
/usr/lib/python2.5/site-packages/yum/transactioninfo.pyc
/usr/lib/python2.5/site-packages/yum/transactioninfo.pyo
/usr/lib/python2.5/site-packages/yum/update_md.py
/usr/lib/python2.5/site-packages/yum/update_md.pyc
/usr/lib/python2.5/site-packages/yum/update_md.pyo
/usr/lib/python2.5/site-packages/yum/yumRepo.py
/usr/lib/python2.5/site-packages/yum/yumRepo.pyc
/usr/lib/python2.5/site-packages/yum/yumRepo.pyo
/usr/lib/yum-plugins
/usr/share/doc/yum-3.2.24
/usr/share/doc/yum-3.2.24/AUTHORS
/usr/share/doc/yum-3.2.24/COPYING
/usr/share/doc/yum-3.2.24/ChangeLog
/usr/share/doc/yum-3.2.24/INSTALL
/usr/share/doc/yum-3.2.24/README
/usr/share/doc/yum-3.2.24/TODO
/usr/share/locale/ca/LC_MESSAGES/yum.mo
/usr/share/locale/da/LC_MESSAGES/yum.mo
/usr/share/locale/de/LC_MESSAGES/yum.mo
/usr/share/locale/es/LC_MESSAGES/yum.mo
/usr/share/locale/fr/LC_MESSAGES/yum.mo
/usr/share/locale/it/LC_MESSAGES/yum.mo
/usr/share/locale/ja/LC_MESSAGES/yum.mo
/usr/share/locale/ms/LC_MESSAGES/yum.mo
/usr/share/locale/nb/LC_MESSAGES/yum.mo
/usr/share/locale/pl/LC_MESSAGES/yum.mo
/usr/share/locale/pt/LC_MESSAGES/yum.mo
/usr/share/locale/pt_BR/LC_MESSAGES/yum.mo
/usr/share/locale/ru/LC_MESSAGES/yum.mo
/usr/share/locale/sr/LC_MESSAGES/yum.mo
/usr/share/locale/sr@latin/LC_MESSAGES/yum.mo
/usr/share/locale/sv/LC_MESSAGES/yum.mo
/usr/share/locale/zh_CN/LC_MESSAGES/yum.mo
/usr/share/man/man5/yum.conf.5.gz
/usr/share/man/man8/yum-shell.8.gz
/usr/share/man/man8/yum.8.gz
/usr/share/yum-cli
/usr/share/yum-cli/callback.py
/usr/share/yum-cli/callback.pyc
/usr/share/yum-cli/callback.pyo
/usr/share/yum-cli/cli.py
/usr/share/yum-cli/cli.pyc
/usr/share/yum-cli/cli.pyo
/usr/share/yum-cli/output.py
/usr/share/yum-cli/output.pyc
/usr/share/yum-cli/output.pyo
/usr/share/yum-cli/shell.py
/usr/share/yum-cli/shell.pyc
/usr/share/yum-cli/shell.pyo
/usr/share/yum-cli/utils.py
/usr/share/yum-cli/utils.pyc
/usr/share/yum-cli/utils.pyo
/usr/share/yum-cli/yumcommands.py
/usr/share/yum-cli/yumcommands.pyc
/usr/share/yum-cli/yumcommands.pyo
/usr/share/yum-cli/yummain.py
/usr/share/yum-cli/yummain.pyc
/usr/share/yum-cli/yummain.pyo
/var/cache/yum
/var/lib/yum
[root@athlonz ~]#
Thanks alot.. i have spent the last 1 hr trying to get the locations of the programs. Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm -i --prefix=/home/user package.src.rpm doesn't work? registering Linux - Software 2 07-18-2007 12:28 PM
installed apache from source, didn't remove rpm, updated rpm causes problems leftPeg Linux - Newbie 5 06-06-2007 10:20 PM
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 08:46 PM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 10:22 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 08:19 AM


All times are GMT -5. The time now is 03:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration