D
D
Danil Trubitsyn2017-08-17 15:35:40
linux
Danil Trubitsyn, 2017-08-17 15:35:40

How to find all files containing a specific word in Ubuntu?

To solve this problem, I used the command

sudo grep -Hr "искомый текст" /etc/ | cut -d: -f1 | sort -u

but now it seems to find the search word in all files, at least it lists all the files in the directory.
It is necessary that a list of only those files that contain the search word is displayed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Derevyanko Alexander, 2017-08-17
@dio4

here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question