For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > rpm

rpm

Created by dave. Last edited by dave, 9 years and 3 days ago. Viewed 2,577 times. #4
[diff] [history] [edit] [rdf]
labels
attachments

RPM Examples

List all installed rpms:
$ rpm -qa

List rpm owning file:
$ rpm -qf file
$ rpm -qf /sbin/ifconfig

List files installed by an rpm:
$ rpm -ql rpm

Query an rpm file instead of an installed rpm:
$ rpm -qp rpmfile (other options)

Get a description of an rpm:
$ rpm -qip rpmfile

You can combine options; for example, return the description and file list for the rpm which owns /sbin/ifconfig:
$ rpm -qilf /sbin/ifconfig

You can use cpio to extract the contents of RPMs. This will extract the contents of the RPM treating the current directory as the "root" directory:
$ rpm2cpio rpmfile | cpio -idmv

Local RPM Building:

$ mkdir ~/rpms
$ cd ~/rpms
$ mkdir BUILD RPMS SOURCES SPECS SRPMS tmp
Contents of ~/.rpmmacros
%_topdir /home/username/rpms
%_tmppath /home/username/rpms/tmp
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt