You may know to how to extract a tarball and zip files on Linux and Unix-like system. Someone, recently PM me with a question:
Dear nixCraft,
Dear nixCraft,
Advertisements
How do I extract an RPM package file without installing it on my Fedora Linux or CentOS or RHEL (Red Hat Enterprise Linux) Suse Linux?
The presidencies of Kennedy and Johnson, the events of Vietnam, Watergate, and other historical events unfold through the perspective of an Alabama man with an IQ of 75, whose only desire is to be reunited with his childhood sweetheart. Total Commander Ultima Prime 7.2 brings updated version of Universal Extractor (archive and installers extracting application). Universal Extractor 2 is an unofficial updated and extended version of the original UniExtract (original application was a part of TC UP since very long time, but. View and Download ABB COMMANDER C355 user manual online. COMMANDER 350 series controlIT 1/4 DIN Advanced Process Controller. 4.3 Level 3 – Set Points.1 3. 0 8 Cascade Set Point Ratio C. R tO In automatic mode, the slave set point value is: 1. 0 00 (ratio x master output) + bias. 0.001 to 9.999.1 3. Run/Hold Action ACtx P. Army Command Policy.Army Regulation 600–20 Effective 6 November 2014 H i s t o r y. T h i s p u b l i c a t i o n i s a n a d m i n i s t r a t i v e r e v i s i o n. T h e p o r t i o n s affected by this administrative revision are listed in the summary of change. S u m m a r y. T h i s r e g u l a t i o n i m p l e m e n t s.
Sincerely,
CentOS user.
Extracting rpm file using combination of rpm2cpio and cpio command
To be frank, there is no direct option available for the rpm command to extract an RPM file. However, there is a small nifty utility available called rpm2cpio. It extracts cpio archive from RPM Package Manager (RPM) package. With the following hack, you will be able to extract an RPM file. First you use the rpm2cpio to convert the .rpm file into a cpio archive on standard out. If a - argument is given, an rpm stream is read from standard in. The basic syntax is as follows:
Syntax
Examples – Extract files from rpm
![Pg commander 1.3.0 game Pg commander 1.3.0 game](/uploads/1/2/6/5/126518215/422713310.png)
Download an RPM file:
To extract RPM file using rpm2cpio and cpio command, type:
Sample outputs:
$ mkdir test
$ cd test
$ wget https://www.cyberciti.biz/files/lighttpd/rhel4-php5-fastcgi/php-5.1.4-1.esp1.x86_64.rpm
To extract RPM file using rpm2cpio and cpio command, type:
$ rpm2cpio php-5.1.4-1.esp1.x86_64.rpm | cpio -idmv
Sample outputs:
In this example, output of the rpm2cpio command piped to the cpio command with the following options:
- i: Restore archive
- d: Create leading directories where needed
- m: Retain previous file modification times when creating files
- v: Verbose i.e. display progress
Verify that you have extracted an RPM file in the current directory:
Sample outputs:
$ ls
Sample outputs:
Say hello to tar command
Another option is just use the tar command:
$ tar xvf file.rpm
Related: How to extract a .deb file without opening it on Debian or Ubuntu Linux
Say hello to Midnight Commander
GNU Midnight Commander (mc) is a directory browser/file manager for Unix-like operating systems. Install mc using the following yum command:
# yum install mc
Opening an RPM file using Midnight Commander (mc)
You can use mc command as follows to browse or extract rpm files:
Sample outputs:
$ mc
Sample outputs:
Next select an RPM file (such as php-5.3*.rpm) by highlighting the package name and press Enter key. You need to select CONTENTS.cpio file:
To view/edit/extract files click or press on the special function keys. In this example, I pressed F3 function key to view php.conf file:
To view/edit/extract files click or press on the special function keys. In this example, I pressed F3 function key to view php.conf file:
Say hello to tar command
Another option is just use the BSD tar command:
Please note that this option only works with the BSD version of tar command. So if you are on MacOS or FreeBSD try the tar command to extract an rpm file.
$ tar xvf file.rpm
Please note that this option only works with the BSD version of tar command. So if you are on MacOS or FreeBSD try the tar command to extract an rpm file.
Conclusion
I hope you found these tips useful to extract configuration file or another file without installing an RPM file.
See also
Pg Commander 1.3.0 Free
- Man pages rpm(8),cpio(1),rpm2cpio(1),mc(1)
- GNU Midnight Commander home page.
Pg Commander 1.3.0 Cheats
ADVERTISEMENTS