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.)
In situations where the question asks for tools that show the exact executable used by the shell, which and type are more appropriate answers because they consider the shell's environment and $PATH.
So, while locate could technically find executables, which and type are still the better choices in this case.
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
salah112
3 months, 2 weeks agobtomasz
1 year, 4 months agoJack67
1 year, 6 months agoAmycert
1 year, 10 months agoshurik04
1 year, 9 months agoshurik04
2 years, 1 month agochikuwan
2 years, 3 months agoKiddyLitty
2 years, 7 months agorjlg2centos8
4 years, 1 month agoilputto
4 years, 1 month agoQuastor
3 years, 10 months ago