How to get all files which has a specific string or text in linux terminal ?

To get the files which contain that specific string or text, use this command.

grep -rli 'wanted text' *

We used a UNIX program called grep. grep is used to grab / get the file containing this text between those single quotes.

If you want to get new posts, make sure to subscribe to Value In Brief by Email.

Post a Comment

0 Comments