What Does grep Mean?

Grep is a command used in Linux, UNIX and Unix-like operating systems to search text, files or any document for a user-specific pattern, a string of text or a matching character. It displays the matching line on the screen that contains the searched object/objects. Grep is one of the most powerful commands on operating systems like Unix or Linux.


Techopedia Explains grep

The term grep originates from a command in Unix which used to perform a similar operation, g/re/p, which means “globally search a regular expression and print.”

The basic syntax of grep is:

grep [option(s)] pattern [file(s)] Where the given pattern is searched inside the lines contained in the named files. The objects listed inside the square brackets are optional. When the options and input file are not specified, then the grep command searches for standard input (which is by default the standard text typed on the keyboard) and each line that happens to constitute the given pattern is displayed.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…