Find a text with in Files in Linux

0
22

Its a useful command that will reduce manual effort and inaccuracy in finding a Text from inside files

suppose we are searching all files that contains meabi

syntax :

]# grep “meabi” *.txt

will list all text files containing meabi

and to use recursively change command with -r switch

]# grep -r “meabi” *.txt

will list all text files containing meabi from all subdirectories from the present directory

LEAVE A REPLY

Please enter your comment!
Please enter your name here