nerdexam
CompTIA

220-1102 · Question #716

A customer who uses a Linux OS called the help desk to request assistance in locating a missing file. The customer does not know the exact name of the file but can provide a partial file name. Which…

The correct answer is C. grep F. find. In Linux, the find command is used to locate files by name within a directory hierarchy, and grep can filter the output or search file contents based on a partial name.

Operating Systems

Question

A customer who uses a Linux OS called the help desk to request assistance in locating a missing file. The customer does not know the exact name of the file but can provide a partial file name. Which of the following tools should the technician use? (Choose two.)

Options

  • Acat
  • Bdf
  • Cgrep
  • Dps
  • Edig
  • Ffind
  • Gtop

How the community answered

(37 responses)
  • B
    8% (3)
  • C
    76% (28)
  • D
    3% (1)
  • E
    3% (1)
  • G
    11% (4)

Why each option

In Linux, the `find` command is used to locate files by name within a directory hierarchy, and `grep` can filter the output or search file contents based on a partial name.

Acat

The `cat` command concatenates and displays file content, it is not used for locating files by name.

Bdf

The `df` command reports file system disk space usage, unrelated to finding specific files.

CgrepCorrect

The `grep` command is a powerful utility for searching plain-text data sets for lines that match a regular expression. It can be used in conjunction with other commands like `ls` or `find` to filter their output based on a partial file name or to search the contents of files for specific patterns.

Dps

The `ps` command reports information about current processes, not files.

Edig

The `dig` command is a network utility for querying DNS name servers, unrelated to file searching.

FfindCorrect

The `find` command is specifically designed for searching for files and directories within a specified directory hierarchy. It allows searching by various criteria, including partial file names (using wildcards), modification times, sizes, and permissions, making it ideal for locating missing files.

Gtop

The `top` command displays dynamic, real-time view of running system processes, not for finding files.

Concept tested: Linux file searching commands

Source: https://www.gnu.org/software/findutils/manual/html_node/find_html/find-command.html

Topics

#Linux commands#File searching#Command-line utilities#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full 220-1102 Practice