I found this exact question for Debian here: List all commands of a specific Debian package
But it seems no one has ever asked this for RHEL/CentOS (or OpenSUSE for that matter).
For instance, I can run rpm -qf $(which dig)
to find out that dig
comes from the bind-utils
package. I can run yum -C info bind-utils
to quickly see the data on that package...but how can I see what other commands are included in the bind-utils
package?
Ideally the solution should be independent of my $PATH
variable, as even with a broken path or a non-system user path (e.g. not including /sbin
), I might simply want to know what commands were installed from a given package.
rpm -ql $package | grep bin/
-- which simply lists the files in the package and greps for a binary path (sbin or bin).mailman
, for example, has many executables under /usr/lib/mailman - most of them are intended to be executed by the mailman system itself rather than on the command line.