LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-05-2008, 04:28 PM   #1
RileyTheWiley
Member
 
Registered: Dec 2007
Posts: 59

Rep: Reputation: 15
How to get one file out of a large rpm file or cvs distro?


I am in need of a particular single file (editraise.xpm in the Qt tree, if it matters) that I don't have. I can find it within an RPM or a cvs site somewhere (don't recall offhand).

I would like to know the easy way to extract and unpack that single file onto my system.

How to do it?

Thanks

Eric
 
Old 01-05-2008, 04:59 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Use rpm2cpio and cpio;

rpm2cpio < the_rpm_filename_here > something.cpio
cpio -i -d < something.cpio
 
Old 01-05-2008, 05:15 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Or in one-line piped command
Code:
rpm2cpio qt2-designer-2.3.0-3mdk.i586.rpm | cpio -idmv *editraise.xpm
this will extract the files called editraise.xpm (there are two of them in the package) with the directory structure as in the original package, but relative to the current directory. In other words, you will get the following:
Code:
# find . -type f
./usr/lib/qt2/tools/designer/pics/large/editraise.xpm
./usr/lib/qt2/tools/designer/pics/small/editraise.xpm
./qt2-designer-2.3.0-3mdk.i586.rpm
 
Old 01-06-2008, 09:46 PM   #4
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I've always just used file-roller:
http://fileroller.sourceforge.net/
 
Old 01-06-2008, 09:56 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There is also a program called "unrpm" that combines the rpm2cpio and the cpio commands. You may have it already. The "mc" console filemanager can also extract files from an rpm package. Select the rpm file, and then CONTENTS.cpio in the package.
 
  


Reply



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
editing a very large HTML file (or, extracting URLs from a file) Chriswaterguy Linux - Software 3 11-27-2007 06:07 PM
File too large (script is too large to execute) DeuceNegative Linux - General 1 05-09-2007 12:10 AM
File does not exist/Large file support dreamtheater Linux - General 3 04-19-2004 09:14 AM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 04:08 PM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:50 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