010-100 · Question #14
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. Several commands help locate programs, but only one also reports associated man page locations. The whereis command displays the binary, source, and man page paths for a given command.
Question
When you are looking for brief information about a program in your PATH with its associated man pages, you would use ...
Options
- Awhich
- Bwhereis
- Clocate
- Dwhere
How the community answered
(52 responses)- A10% (5)
- B85% (44)
- C2% (1)
- D4% (2)
Why each option
Several commands help locate programs, but only one also reports associated man page locations. The whereis command displays the binary, source, and man page paths for a given command.
The which command only shows the full path of the executable that would be executed in the current PATH, with no man page information.
The whereis command searches standard binary, source, and manual page directories and returns the locations of all three for a given program name. This makes it the appropriate tool when you need both the program location and its associated man page references simultaneously.
The locate command searches a database of all files on the system by name pattern and is not focused on binaries or man pages specifically.
There is no standard Linux command called where; this is not a valid utility in this context.
Concept tested: Using whereis to find binaries and man pages
Source: https://man7.org/linux/man-pages/man1/whereis.1.html
Topics
Community Discussion
No community discussion yet for this question.