L
L
lapka-admin2018-06-17 09:03:58
linux
lapka-admin, 2018-06-17 09:03:58

How to find a line in files using grep?

How to find all files in the system that have the string str inside, search only among files whose name ends in .conf
Simple grep -l 'str'but searches too long
Tried

grep -l 'str' /*.conf
grep -l 'str' *.conf

But it says No such file or directory

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-06-17
@lapka-admin

find -name '*.conf' -print0 | xargs -0 grep -l str

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question