010-150 · Question #85
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. The whereis command locates the binary, source, and manual page files for a given command, making it the right tool when you need both the executable location and man page references.
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
(31 responses)- A6% (2)
- B81% (25)
- C3% (1)
- D10% (3)
Why each option
The whereis command locates the binary, source, and manual page files for a given command, making it the right tool when you need both the executable location and man page references.
which only outputs the full path of the executable that would be run, and provides no information about man pages.
whereis searches standard binary, source, and manual page directories and returns all associated paths for a given program name, including man page locations. Unlike which, it is not limited to the executable alone. This makes it the correct choice when the goal is to find brief program info alongside its documentation.
locate searches a prebuilt file index for any file matching a pattern and is not specific to programs in PATH or their man pages.
where is not a standard Linux command; it exists in some shells like csh/tcsh as a built-in but does not report man page locations.
Concept tested: Linux command lookup tools - whereis vs which
Source: https://man7.org/linux/man-pages/man1/whereis.1.html
Topics
Community Discussion
No community discussion yet for this question.