101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 49


Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?

Show Answer
Correct Answer: E

The command 'which foo' displays the path to the executable file that would be executed when the command 'foo' is invoked. 'which' is specifically used to locate the executable file associated with a given command by searching through the directories listed in the PATH environment variable.

Discussion

3 comments
Sign in to comment
shyamiteOption: E
Feb 21, 2020

A. lsattr foo -- lsattr: No such file or directory while trying to stat ls B. apropos foo - all man pages - apropos - search the manual page names and descriptions C. locate foo - locate file via updatedb refernce D. whatis foo - whatis - display one-line manual page descriptions E. which foo - show location lib -which - locate a command

Tewodros89Option: E
Sep 15, 2023

E which: A command that searches for the executable file associated with the given command in the directories listed in the PATH environment variable. foo: The command for which you want to determine the executable file's path.

NinymoOption: E
Mar 24, 2024

Answer: E