Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract files from a package ???

Status
Not open for further replies.

HaoDr

IS-IT--Management
Sep 26, 2001
32
VN
Hi all,

Please tell how to extract files from a package into a directory without install this package again ( for example, sometimes, I delete some files such as readme, *.html by chance, then I would like to extract them again ) Please give me a sample command with arguments/options.

Thanks

Hao Dr
 
Hi,

Well you can do a forced upgrade suppressing the install script but that would still replace existing files - e.g.

rpm -Uvh --noscripts --replacepkgs Package.rpm

You can also extract individual files like in this example :

rpm2cpio logrotate-1.0-1.i386.rpm |cpio -ivd usr/man/man8/logrotate.8

It is also possible to do things like (i) create a new rpm database in another directory (ii) install package to another location while referring to that new rpm database (iii) copy the files you need & delete the unneeded stuff.

The best reference on rpm is --> .

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top