101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 94


Which of the following tools can show the complete path of an executable file that the current shell would execute when starting a command without specifying its complete path? (Choose two.)

Show Answer
Correct Answer: CE

To determine the complete path of an executable file that the current shell would execute when starting a command without specifying its complete path, two effective tools are 'which' and 'type'. The 'which' command searches the PATH for executable files and returns the full path to the command. Similarly, the 'type' command can also be used to display information about shell commands, including showing the full path of executables. Therefore, these two tools successfully fulfill the requirements specified in the question.

Discussion

7 comments
Sign in to comment
shurik04Options: CE
Oct 20, 2022

CE is correct

AmycertOptions: CD
Feb 8, 2023

C and D. E is incorrect

shurik04
Feb 9, 2023

then justify your claim.

chikuwanOptions: CD
Aug 17, 2022

which and locate

rjlg2centos8Options: CE
Oct 20, 2020

Also locate command can show the full path of a executable, but if it says two all right, the other options are more correct.

ilputto
Oct 25, 2020

yes, but locate needs the updatedb.

Quastor
Jan 27, 2021

+ mlocate as it's not builtin hehe

KiddyLitty
Apr 14, 2022

locate command will show every possible items that contained *command* It has default file globbing that needs regex control during searching.

Jack67Options: CD
May 17, 2023

C&E not D

btomaszOptions: CE
Aug 6, 2023

C and E is correct. locate would also show other Files and excecutables outside the $PATH directories. So it does not match the requirements of the question.