0

How to search a Specific Pattern recursively

Hello,I just want to search a pattern and see the results from the entire directory recursively .Is that possible?

grep CentOS Add a comment
Aditya
asked Sep 25 2019

Answer

0

try running the below command to search a pattern recursively.

grep -r "pattern" /var

From the above command,grep searches for the pattern entirely from the specified directory and also its sub directories

-r ---> recursive search

Add a comment
linuxhelp
asked Sep 25 2019
edited Sep 25 2019
Post your Answer