Skip to content
RadBuilds RadBuilds
unix linux grep util

Why the hell can't I remember grep syntax?!

A quick reference for grep flags so I stop googling it every week.

Radosław Domański

Radosław Domański

1 min read
Grep help

Well, I don’t know. It’s not like I don’t use it. I have to use it every now and then. Usually at least once a week… But for some reason it slips my mind every single time. So in order to stop googling it again and again I can just have it here. Maybe it will also help someone else :)

so here goes nothing. To find all files containing specific text on Linux you just need to execute something like that

grep -Rnwil '/path/to/somewhere/' -e 'pattern'
grep -Rnwil '.' -e 'RollbackException'

explanations:
        -R = recursive.
        -n = line number
        -w = match the whole word
        -i = ignore case
        -l = (small L) show the file name, not the result itself

NOTE: mostly based on this

Back to Blog
Share:

Follow along

Stay in the loop — new articles, thoughts, and updates.