What is grep command used for in Linux?
Experience Level: Junior
Tags: Linux
Answer
Grep is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files.
Related Linux job interview questions
What is df command used for in Linux?
Linux JuniorWhat is sudo command used for in Linux?
Linux JuniorWhat is find command used for in Linux?
Linux JuniorWhat is locate command used for in Linux?
Linux JuniorWhat is touch command used for in Linux?
Linux Junior