Operating System - Linux
1748051 Members
5022 Online
108757 Solutions
New Discussion юеВ

Re: Installed location of a package

 
SOLVED
Go to solution
Vibhor Kumar Agarwal
Esteemed Contributor

Installed location of a package

Hi,
I want to find the installed location of a RPM. The RPM might be installed in normal location or might be relocated as well.

Aware of the "rpm -ql" command which gives the list of files.

Is there any other way to find the location?
Vibhor Kumar Agarwal
5 REPLIES 5
Nuwan Alwis
Valued Contributor

Re: Installed location of a package

Hi Kumar,
I dont think rpm -ql will help you in this because it only does is list the files inside your rpm.

There is no single command i know to solve your problem but i can suggest you this.
1)get the "rpm -ql pakage.rpm" out put.
this will list you what ever the files going get installed on the system.

2) use "find" or "locate" to find the location of the files got from step 1s output.
eg: "find / -name name-of-file"
if u r planing to use "locate" run "updatedb" prior to "locate"

3)use "rpm -qf /file/path/from/step2" to verify what rpm installed this file on the system.

Hope this is what you wanted to do.

Good Luck....!
Asif Sharif
Honored Contributor

Re: Installed location of a package

Hi Agarwal,

The best way you already mentioned, e.g. "rpm -ql" besides that you may use find or locate command but i don't think so your desire result will be fulfill.

Regards,
Asif Sharif
Regards,
Asif Sharif
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Installed location of a package

Looks like the RPM guys haven't made a command to find the location.

I will have to go with the tedious & lengthier way.

Thanks
Vibhor Kumar Agarwal
Ivan Ferreira
Honored Contributor
Solution

Re: Installed location of a package

What about:

rpm -q --queryformat %{installprefix}"\n" postfix


Check tags with:

rpm --querytags

"The INSTALLPREFIX tag is used to display the actual path used when a relocatable package was installed."
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Installed location of a package

Cool
That was what I was looking for.

Thanks
Vibhor Kumar Agarwal