Certified Ethical Hacker CEH · Free Practice Question Easy
Question 72
- A search
- B cat
- C grep
- D chmod
Reveal correct answer
Correct answer: C
Explanation
Correct Answer:
grep is correct.
Per grep’s man page, grep searches a file for lines containing a match to a given pattern. By default, grep prints the matching lines. In addition, two variant programs are available: egrep is the same as grep -E (interprets the pattern as an extended regular expression), and fgrep is the same as grep -F (allows you to use a list of fixed strings—any of which will be matched). Direct invocation as either egrep or fgrep is deprecated but is provided to allow historical applications that rely on them to run unmodified.
Incorrect Answers:
cat, chmod, and search are incorrect.
The cat command reads a file to screen (or output to whatever you want), chmod changes permissions, and search does not exist.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
