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
2 months, 2 weeks agobtomasz
1 year, 2 months agoJack67
1 year, 5 months agoAmycert
1 year, 8 months agoshurik04
1 year, 8 months agoshurik04
2 years agochikuwan
2 years, 2 months agoKiddyLitty
2 years, 6 months agorjlg2centos8
4 years agoilputto
4 years agoQuastor
3 years, 9 months ago