Fast alternative to yum whatprovides
December 29, 2011 by: Youzhny
Linux: yum options you may not know exist.
Most of the users who work with distributions such as: centos, fedora, redhat, etc use yum as a package update/installer. Most of them know how to do “yum update [packagename]” (to update all or [certain packages]) or they do “yum install packagename” to install certain package(s). But yum can do so much more. Here are some options you may find useful:
Following command will search for the string you specified. Generally this will give you all of the packages which has specified string in title or description. Most of the time you will have to look through a lot of output to find what you are looking for.
yum search string
Probably one of the most important options for yum is provides/whatprovides. If you know what command you need, you can find out what package you have to install in order to have that command available to you.
yum provides (or whatprovides) command
Following command is same as above but with less output.
yum -d 1 provides command
So for example if you are trying to figure out what you need to install to use bunzip2, type:
yum -d 1 provides bunzip2
you will get a similar output as below.
# yum -d 1 provides bunzip2
bzip2.x86_64 1.0.2-13.EL4.3 base
bzip2.x86_64 1.0.2-13.EL4.3 base
man-pages-fr.noarch 0.9.7-13.el4 base
man-pages-ja.noarch 20050215-2.EL4.3 base
man-pages-pl.noarch 0.23-5 base
As you can see bunzip2 is part of bzip2 package. So now you can you just install bzip2.x86_64 to get bunzip2.
For example:
If yum whatprovides /path/to/file is slow for you, try a faster alternative:
rpm -q –whatprovides /path/to/file
For example:
$ rpm -q –whatprovides /usr/bin/clibrary
speech-dispatcher-0.7.1-5.fc15.x86_64
rpm is quite fast and yum is too slow. Get back to basics!
Have you found this script useful? Please support author by PayPal donation.- Linux commands to help you navigate
- Solaris > Add / Install new software packagesv
- Linux rpm command no such file or directory error and solution
- Howto Setup yum repositories to update or install package from ISO CDROM Image
- Converting .rpm Packages To Debian/Ubuntu .deb Format With Alien
- Converting .rpm Packages To Debian/Ubuntu .deb Format With Alien
- Linux audit files to see who made changes to a file
- Basic commands, Part I: Compress and decompress files using rar, bzip, tarball(tar) and gunzip
- CMS Tree Page View Plugin For WordPress
- Linux > Command line BitTorrent client