Welcome to the Linux Foundation Forum!

Useful command arguments undocumented in man

Options

Hello all, currently working through the labs for this course, and when going through Lab 6.2 for RPM ("Rebuilding the RPM Database"), I couldn't find anything in the rpm man pages that covered the --rebuilddb switch, or under rpm --help. This is on CentOS 7.

It's possible I just need new glasses, but this made me wonder if there is such a thing as a list of useful commands that are not necessarily well documented on the tools available during the exam, and are worth spending extra time getting to grips with?

Cheers

Comments

  • lee42x
    lee42x Posts: 380
    Options

    Hello dacarab,
    Well not actually hidden, but easy enough to find. I believe the lecture notes mentioned a command "rpmdb", this is the one you are looking for. Now to find commands you might not know, start with the ones you do know like "rpm". If you run " man rpm" , it will give you the manual page for that command, now look near the bottom of the page and you will find a "SEE ALSO" section that will list related commands. Yes, "rpmdb" is in the list.

    My personal favorite commands are; find, grep and man. Something like "man -wK rebuilddb" will show which man page contains the phrase "rebuilddb"

    Lee

  • coop
    coop Posts: 915
    Options

    The exact command seems to depend on version of Fedora or RHEL/CentOS. I was not even aware there was an "rpmdb" command :) There has always been an option to rebuild the data base under either "rpm" or "rpmbuild" (The course says to use "rpm --rebuild". On my system (RHEL 8) sudo rpm --rebuilddb clearly works; sudo rpm --rebuild seems to be a no-op. Go figure. sudo rpmdb --rebuild seems to do the trick. Must be the preferred way since the man page for rpm does not mention the rebuild thing. Once again, go figure :)

  • dacarab
    dacarab Posts: 8
    Options

    Nice one - I hadn't thought to try man -Kto search through, that's a good tip. Cheers

Categories

Upcoming Training