I am looking for a way to find options and commands. Many are listed in man pages but are not on my system. For example I was told to find the xxd hex viewer in ‘vim-common’. How can I search for programs like ‘xxd’ in packages? Say I wanted to install ‘xxd’. Are there options using dnf or rpm that would help me find that it is in the ‘vim-common’ package? I am wanting to find several programs but can’t quite at this moment remember them individually. has anyone ran into this?
sudo dnf repoquery whatprovides /usr/bin/xxd
as long as you know that path is you can search for it using whatprovides.
repoquery and also be abrieviated with rq
dnf reference here
If it is a command you are looking for, you can use
dnf provides subcommand to drop
/usr/bin/ part and search by using only the command name:
$ sudo dnf provides xxd [sudo] password for ersen: Last metadata expiration check: 0:23:36 ago on Sun 06 Feb 2022 08:55:41 AM +03. vim-common-2:8.2.3404-1.fc35.x86_64 : The common files needed by any version of the VIM editor Repo : fedora Matched from: Filename : /usr/bin/xxd vim-common-2:8.2.4232-1.fc35.x86_64 : The common files needed by any version of the VIM editor Repo : @System Matched from: Filename : /usr/bin/xxd vim-common-2:8.2.4232-1.fc35.x86_64 : The common files needed by any version of the VIM editor Repo : updates Matched from: Filename : /usr/bin/xxd
It is explained in the
Provides Command section:
DNF assumes that the <provide-spec> is a system command, prepends it with /usr/bin/, /usr/sbin/ prefixes (one at a time) and does the file provides search again. For legacy reasons (packages that didn’t do UsrMove) also /bin and /sbin prefixes are being searched: