CompTIA
LX0-103 · Question #97
LX0-103 Question #97: Real Exam Question with Answer & Explanation
The correct answer is E: whereis. The whereis command searches for a program's binary, source code, and man page files, making it the correct tool for locating all three components at once.
GNU and Unix Commands
Question
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
Options
- Adirname
- Bwhich
- Cbasename
- Dquery
- Ewhereis
Explanation
The whereis command searches for a program's binary, source code, and man page files, making it the correct tool for locating all three components at once.
Common mistakes.
- A. dirname strips the non-directory suffix from a given path string and does not search for files at all.
- B. which only locates the executable binary of a command by searching directories listed in the PATH variable, not man pages or configuration files.
- C. basename strips the directory prefix from a path string and does not perform any file searching.
- D. query is not a standard Linux utility for locating programs or their associated files.
Concept tested. Linux whereis command for file location
Reference. https://man7.org/linux/man-pages/man1/whereis.1.html
Topics
#whereis#command location#man pages#configuration files
Community Discussion
No community discussion yet for this question.