Find out what package some command belongs to (on RPM systems)

rpm -qif `which more`
Replace 'more' command with any command which is in your PATH.
Sample Output
Name        : util-linux-ng                Relocations: (not relocatable)
Version     : 2.13.1                            Vendor: Fedora Project
Release     : 2.fc8                         Build Date: wto, 22 kwi 2008, 22:24:21
Install Date: pon, 5 maj 2008, 14:11:10      Build Host: xenbuilder1.fedora.redhat.com
Group       : System Environment/Base       Source RPM: util-linux-ng-2.13.1-2.fc8.src.rpm
Size        : 5028446                          License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
Signature   : DSA/SHA1, pon, 28 kwi 2008, 21:31:42, Key ID b44269d04f2a6fd2
Packager    : Fedora Project
URL         : ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
Summary     : A collection of basic system utilities
Description :
The util-linux-ng package contains a large variety of low-level system
utilities that are necessary for a Linux system to function. Among
others, Util-linux contains the fdisk configuration tool and the login
program.

3
By: alcik
2009-02-27 08:59:07

What Others Think

rpm -qif `which more` bash: rpm: command not found
TheBunman · 499 weeks and 2 days ago
Use of backticks deprecated in favour of $( ). a) backticks are harder to read b) $( ) can be nested More can be done than "which more": rpm -q --whatprovides /etc/sysconfig/msec msec-0.50.11-1.1mdv2009.0
mpb · 495 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: