yum Command: List The Contents (Files) Of A Package on Linux

‮h‬ttps://www.lautturi.com
yum Command: List The Contents (Files) Of A Package on Linux

To list the contents (files) of a package on a Linux system using the yum command, you can use the yum provides subcommand and specify the name of the file you are looking for.

For example, to list the contents of the nano package, you can use the following command:

yum provides *bin/nano*

This will list the files in the nano package that match the search pattern *bin/nano*.

Alternatively, you can use the repoquery command to list the contents of a package. The repoquery command is part of the yum-utils package, which you may need to install first. To install the yum-utils package, you can use the following command:

yum install yum-utils

Once yum-utils is installed, you can use the repoquery command to list the contents of a package. For example, to list the contents of the nano package, you can use the following command:

repoquery --list nano

This will list all the files in the nano package.

Keep in mind that you will need to have root privileges (or be a member of the sudo group) in order to use the yum or repoquery commands.

Created Time:2017-10-30 14:27:36  Author:lautturi