101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 101


Which of the following commands can perform searches on file contents using regular expressions?

Show Answer
Correct Answer: C

The command 'grep' is specifically designed to search through file contents using regular expressions. It is widely used in Unix-like operating systems to search for patterns within text files. The other commands listed, such as 'find', 'locate', 'reggrep', and 'pgrep', do not have the primary function of searching text using regular expressions. 'find' is used to search for files and directories, 'locate' searches for files by name, 'pgrep' searches for processes, and 'reggrep' is not a standard command.

Discussion

2 comments
Sign in to comment
iwkno6Option: C
Jul 28, 2021

grep for basic regular expressions egrep OR grep -E for extended regex

AmycertOption: C
Feb 8, 2023

grep very easy