nerdexam
Linux_FoundationLinux_Foundation

LFCS · Question #870

LFCS Question #870: Real Exam Question with Answer & Explanation

The correct answer is C: find. The find command can be used to recursively search for files, including executables, in specified directories, irrespective of the $PATH environment variable.

Submitted by valeria.br· Apr 18, 2026Essential Commands

Question

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?

Options

  • Aapropos
  • Bwhich
  • Cfind
  • Dquery
  • Ewhereis

Explanation

The find command can be used to recursively search for files, including executables, in specified directories, irrespective of the $PATH environment variable.

Common mistakes.

  • A. apropos searches the man page database for keywords, not the filesystem for executable files.
  • B. which specifically searches for executable commands only within the directories listed in the user's $PATH environment variable.
  • D. query is not a standard Linux command for searching for files on the filesystem.
  • E. whereis locates source, binary, and man page files for a command, primarily by searching standard system locations, not arbitrary directories outside $PATH.

Concept tested. File searching utilities

Reference. https://man7.org/linux/man-pages/man1/find.1.html

Topics

#File search#`find` command#Filesystem navigation#Executable files

Community Discussion

No community discussion yet for this question.

Full LFCS PracticeBrowse All LFCS Questions