Tag: grep

55 votes
14 answers
550 views
How can I exclude directories from grep -R?

I want to traverse all subdirectories, except the "node_modules" directory.

avatar
Keila
0 1 0 9
asked 07 September, 2021
56 votes
4 answers
1.1K views
How can I use grep to show just filenames on Linux?

How can I use grep to show just file-names (no in-line matches) on Linux? I am usually using something like: f

avatar
Keila
0 1 0 9
asked 07 September, 2021
49 votes
26 answers
489 views
How do I grep recursively?

How do I recursively grep all directories and subdirectories? find . | xargs grep "texthere" *

avatar
Chaya
0 1 0 9
asked 07 September, 2021
56 votes
30 answers
1.1K views
56 votes
12 answers
844 views
How to 'grep' a continuous stream?

Is that possible to use grep on a continuous stream? What I mean is sort of a tail -f <file> command, b

avatar
Lorenzo
0 1 0 9
asked 07 September, 2021
62 votes
22 answers
743 views
Use grep --exclude/--include syntax to not grep through certain files

I'm looking for the string foo= in text files in a directory tree. It's on a common Linux machine, I

avatar
Venice
0 1 0 9
asked 07 September, 2021