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.
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)- B8% (3)
- C76% (28)
- D3% (1)
- E3% (1)
- G11% (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.
The `cat` command concatenates and displays file content, it is not used for locating files by name.
The `df` command reports file system disk space usage, unrelated to finding specific files.
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.
The `ps` command reports information about current processes, not files.
The `dig` command is a network utility for querying DNS name servers, unrelated to file searching.
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.
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
Community Discussion
No community discussion yet for this question.