LFCS Exam QuestionsBrowse all questions from this exam

LFCS Exam - Question 96


Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?

Show Answer
Correct Answer: E

The whereis command can be used to locate programs and their corresponding man pages and configuration files. It searches for the binaries, source files, and manual pages for a specified program across standard directories and those specified in the PATH environment variable. The other commands listed either do not exist or serve different purposes.

Discussion

1 comment
Sign in to comment
StribOption: E
Jun 17, 2023

The correct answer is E. The whereis command can be used to locate programs and their corresponding man pages and configuration files. The whereis command is a useful utility for finding the binary executable, source code, and manual pages related to a specific program. It searches the standard binary directories (/bin, /sbin, /usr/bin, etc.) and other directories specified in the PATH environment variable to locate the program and related files. By running whereis followed by the name of a program, you can quickly determine the location of its binary executable, source code files, and manual pages.

Strib
Jun 17, 2023

the other options for clarification: A. dirname: The dirname command extracts the directory component from a file path. It is not used for locating programs or their related files. B. which: The which command is used to locate the binary executable of a command within directories listed in the PATH environment variable. It does not provide information about man pages or configuration files. C. basename: The basename command extracts the file name component from a file path. It is not used for locating programs or their related files. D. query: There is no standard command called query in most Linux distributions.