Performing CyberOps Using Cisco Security Technologies (CBRCOR) — Question 74

Which bash command will print all lines from the `colors.txt` file containing the non case-sensitive pattern `Yellow`?

Answer options

Correct answer: A

Explanation

The correct answer is A, as the `grep -i` command allows for case-insensitive searching within the file, thus capturing `Yellow` regardless of case. Option B is incorrect because `locate` is used for finding files, not searching within file contents. Option C is also incorrect as `locate` does not support case-insensitive searches in the same way `grep` does. Option D will only find lines that match the exact case of `Yellow`.