101-500 practice question 13 of 30
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
Full set: 246 questionsThe whereis command is specifically designed to locate the binary, source code, and manual page files for a specified command. It searches through a standard set of Linux directories where these files are typically stored. This makes it a comprehensive tool for finding not just the executable program but also its associated documentation and, if available, its source files.
A. dirname extracts the directory portion of a given path, not locate related program files.
B. which only locates the executable file for a command within the directories listed in the $PATH environment variable.
C. basename extracts the non-directory (filename) portion of a given path.
D. query is not a standard Linux command for locating files or programs in this context.
- Linux man page for whereis(1). The NAME section states: "whereis - locate the binary, source, and manual page files for a command". The DESCRIPTION section further details the standard search paths.
- Sobell, M. G. (2018). A Practical Guide to Linux Commands, Editors, and Shell Programming. Prentice Hall. Chapter 4, "Finding Commands," details the differences between which, whereis, and locate.
- The Linux Documentation Project (TLDP), "Introduction to Linux - A Hands on Guide," Section 5.5. "Finding files." This section contrasts find, locate, which, and whereis.
Keep practicing
Take the free 101-500 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 101-500 practice questions
- Question 1Which of the following commands prints a list of available package updates when using RPM…
- Question 2Which of the following commands changes the number of days before the ext3 filesystem on …
- Question 3During a system boot cycle, what program is executed after the BIOS completes its tasks?
- Question 4Which of the following commands reboots the system when using SysV init? (Choose TWO corr…
- Question 5Which of the following commands updates the linker cache of shared libraries?
- Question 6Which of the following commands can be used to create a USB storage media from a disk ima…
