PrepAway - Latest Free Exam Questions & Answers

Which of the following commands can be used to search for the executable file foo when it has been placed in a

Which of the following commands can be used to search for the executable file foo when it
has been placed in a directory not included in $PATH?

PrepAway - Latest Free Exam Questions & Answers

A.
whereis

B.
apropos

C.
which

D.
find

E.
query

2 Comments on “Which of the following commands can be used to search for the executable file foo when it has been placed in a

  1. root says:

    I would say A: whereis is more relevant since you are specifically searching for an executable, no need to use find then, I believe whereis will also search outside your path, correct me if Im wrong. For executables I do whereis, locate, and lastly find.




    0



    0
    1. director47 says:

      A is not correct. whereis as with which, only search the paths listed in your PATH variable.

      the question asks what to use when searching for an executable NOT IN THE $PATH.

      thus you couldnt use whereis or which. you would have to use find.




      0



      0

Leave a Reply