IT Toolbox
Menu
HomeIT Dictionarygrep
IT dictionary

grep

A command used to search for text corresponding to a pattern.

TopicIT knowledge → About 1 min read

Simple definition

A command used to search for text corresponding to a pattern.

Technical definition

grep runs through files or streams and can use regular expressions, recursivity and filters.

What is it used for ?

Quickly find an error or information in the logs.

Practical example

grep -i error /var/log/application.log searches for rows containing error without taking into account the breakage.

Common issues

  • too broad a expression
  • Binnapped by mistake
  • Incomplete result without recursivity

Key takeaway: Exact behavior and commands may vary depending on versions, products and architectures.

Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI

My favorites