LinuxQuestions.org
Review your favorite Linux distribution.
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 06-10-2008, 10:43 AM   #1
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
RPM question


Hi,

If I have rpm package, how do I know where would it install? Is there any command that we can use to check?

Thanks
 
Old 06-10-2008, 10:54 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
rpm -qlp <package>.rpm
Shows the contents of a package but doesn.t extract anything.

Another useful command is rpm2cpio:
rpm2cpio rpmfile.rpm | cpio -i --make-directories [filename_to_extract]
Extracts the contents into the local directory. The [filename_to_extract]
would be any of the files shown in the rpm -qlp so that you can extract only what you want.
 
Old 06-10-2008, 11:17 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by mokku View Post
Hi,

If I have rpm package, how do I know where would it install? Is there any command that we can use to check?

Thanks
hey brother 1st install the rpm package,then type the command
like this,u'll get the directory where it installed.
#which <name of rpm>
 
Old 06-10-2008, 01:14 PM   #4
mokku
Member
 
Registered: Feb 2007
Posts: 197

Original Poster
Rep: Reputation: 30
I know the command after install. I have some of the packages and want to install don't it to overwrite. What is the best way to approach?
 
Old 06-10-2008, 01:59 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The commands I gave you will work to see what is in the new rpm without installing it.

As to preserving your original rpm - From the rpm man page:
--repackage Re-package the files before erasing. The previously installed package will be named according to the macro %_repack- age_name_fmt and will be created in the directory named by the macro %_repackage_dir (default value is /var/spool/repackage).

The flag can be used when doing an upgrade so it will save the original package before erasing it and installing the new one according to the upgrade options section.

You can learn a lot from the man pages - just type "man rpm" for more information.
 
  


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 Question / help dg7080 Linux - Newbie 2 06-14-2006 09:05 PM
rpm question tgkspike Linux - Newbie 2 02-02-2004 10:08 PM
rpm question BajaNick Linux - Software 4 09-14-2003 03:00 PM
rpm question... jmourik Linux - Newbie 2 02-09-2003 10:56 PM
RPM Question Road Linux - General 3 01-24-2002 04:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 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
Open Source Consulting | Domain Registration