101-350 · Question #126
When you are looking for brief information about a program in your PATH with its associated man pages, you would use ...
The correct answer is B. whereis. See the full explanation below for the reasoning.
Question
Options
- Awhich
- Bwhereis
- Clocate
- Dwhere
How the community answered
(31 responses)- A10% (3)
- B84% (26)
- C3% (1)
- D3% (1)
Community Discussion
4The answer is B, whereis. The whereis command is specifically designed to locate the binary, source files, AND man page sections for a given program, all in one shot, which is exactly what "brief information about a program in your PATH with its associated man pages" is describing. which only tells you the path to the executable and nothing about documentation, and locate just searches a filename database with no concept of man pages at all. If you see any question on this exam that mentions man pages alongside the binary location, lock in whereis every time.
I almost circled A first, since the PATH part of that question pulled me straight toward which. What stopped me was remembering that which only hands you the file location, but whereis is the one that also points you to the man pages, so it covers the whole description the question is giving you.
The stem says "brief information about a program" plus "associated man pages," which is your signal to eliminate anything that only returns a file path. Which of the options here does more than just locate the binary itself?
Exactly right, and the giveaway for me was that whatis will also list multiple section numbers if a topic appears in more than one man page, so it goes beyond a one-line description and actively points you to the manual itself, which nothing like which or whereis bothers to do.