nerdexam
LPI

010-150 · Question #4

Which of the following programs is used to search for files in a file system?

The correct answer is A. locate. The locate command searches a pre-built database index of the filesystem to quickly find files by name or path pattern.

Initial Client Consultation and Assessment

Question

Which of the following programs is used to search for files in a file system?

Options

  • Alocate
  • Bshowfiles
  • Cflocate
  • Dsearch
  • Efindfiles

How the community answered

(36 responses)
  • A
    78% (28)
  • B
    14% (5)
  • C
    6% (2)
  • D
    3% (1)

Why each option

The locate command searches a pre-built database index of the filesystem to quickly find files by name or path pattern.

AlocateCorrect

locate searches a prebuilt index database (typically updated by updatedb) to find files matching a given name or pattern extremely quickly without traversing the live filesystem. It is a standard utility on Linux systems for file searching by name, and is part of the mlocate or findutils-locate packages depending on the distribution.

Bshowfiles

'showfiles' is not a standard Linux or Unix utility and does not exist as a recognized file-search command.

Cflocate

'flocate' is not a standard Linux command; there is no utility by that name in common Linux distributions.

Dsearch

'search' is not a standard Linux file-search utility in common distributions.

Efindfiles

'findfiles' is not a standard Linux command; the standard tools for file searching are locate and find.

Concept tested: Using locate command to search the filesystem

Source: https://man7.org/linux/man-pages/man1/locate.1.html

Topics

#locate command#file search#Linux utilities#filesystem navigation

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice