How would you use grep to find a file inside a directory that contains a certain string inside it's content.
1 Answer
You can use command like:
grep -lR string directory/*
-l will print only the filename instead of content. -R will do it recursively. If you need to do it only in "directory" remove -R
grep -l string directory/*
1 Comment
tripleee
You might want to refrain from answering questions which are common FAQs. They usually have a number of duplicates with multiple answers, many of which contain information which isn't in yours.