A Few Handy QueriesBelow are some examples of situations you might find yourself in, and ways you can use RPM to get the information you need. Keep in mind that these are just examples. Don't be afraid to experiment! Finding Config Files Based on a Program NameYou're setting up a new system, and you'd like to implement some system-wide aliases for people using the Bourne Again SHell, bash. The problem is you just can't remember the name of the system-wide initialization file used by bash, or where it resides:
Learning More About an Uninstalled PackagePractically any option can be combined with -qp to extract information from a .rpm file. Let's say you have an unknown .rpm file, and you'd like to know a bit more before installing it:
By displaying the package information, we know that we have a package file containing RPM version 2.3. We can then peruse the file list, and see exactly what it would install before installing it. Finding Documentation for a Specific PackagePicking on bash some more, you realize that your knowledge of the software is lacking. You'd like to see when it was installed on your system, and what documentation is available for it:
Finding Similar PackagesLooking at bash's information, we see that it belongs to the group "Shells". You're not sure what other shell packages are installed on your system. If you can find other packages in the "Shells" group, you'll have found the other installed shells:
Finding Recently Installed Packages, Part IYou remember installing a new package a few days ago. All you know for certain is that the package installed a new command in the /bin directory. Let's try to find the package:
Finding Recently Installed Packages, Part IIAnother way to see which packages were recently installed is to use the --queryformat option:
Finding the Largest Installed PackagesLet's say that you're running low on disk space, and you'd like to see what packages you have installed, along with the amount of space each package takes up. You'd also like to see the largest packages first, so you can get back as much disk space as possible:
Notes
|
|||||||||||||||||
|
© 2004 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Contact Red Hat |