Skip to content

Instantly share code, notes, and snippets.

@CodigoMatriz
Created August 26, 2021 16:31
Show Gist options
  • Save CodigoMatriz/f1291bb0c98dc7c6333b3bcecc4e0347 to your computer and use it in GitHub Desktop.
Save CodigoMatriz/f1291bb0c98dc7c6333b3bcecc4e0347 to your computer and use it in GitHub Desktop.
[Find string in files] #cli
grep -rnw '/path/to/somewhere/' -e 'pattern'
  • -r or -R is recursive,
  • -n is line number, and
  • -w stands for match the whole word.
  • -l (lower-case L) can be added to just give the file name of matching files.
  • -e is the pattern used during the search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment