How to Use grep Command in Linux / Unix

What is grep command? How to use the grep command in daily administration?

Grep searches the named input files (or standard input if no files are named, or the file name – is given) for lines containing a match to the given PATTERN. By default, grep prints the matching lines. In a simple word, grep can search a word from a content.

Example

You want to search word “biri” from the binatang.txt file.

grep biri binatang.txt

You May Also Like

Leave a Reply?