Using RPM

Q. How do you view files in a given package?
A. $ rpm -q –filesbypkg

Ever wonder which package a file is part of? Try this:

/bin/rpm -qf
$ /bin/rpm -qf /usr/bin/whois

How do you extract files in an RPM without installing the RPM? The below will extract in your ‘pwd’ the files of the RPM.

rpm2cpio rpmname.rpm | cpio -dimv

How do you install Extra Packages for Enterprise Linux (or EPEL) on CentOS 6.x?

sudo wget
sudo wget
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
sudo vim /etc/yum.repos.d/remi.repo 
Enable the remi repo by changing the 0 to 1 for enabled in remi.

For further reference visit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s