CompTIA Linux+ Powered by LPI (LX0-103) — Question 22

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?

Answer options

Correct answer: C

Explanation

The correct answer is C, 'find', as it allows you to search through directories for files matching certain criteria, regardless of whether those directories are included in $PATH. The other options either look for files in predefined locations or are not designed for searching the filesystem in the same way, making them unsuitable for this task.