Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 323 Bytes

grep-:-find-a-string-in-folder.md

File metadata and controls

19 lines (12 loc) · 323 Bytes
  • Date : 2017-09-05
  • Tags : #sysadmin #grep

Grep : find a string in folder

Grep is a greate tool for searching a string in files.

Syntax

$ grep -nr '[string]' [folder]

If you want to show surrounding lines the result, add flag -C [number] to the command

$ grep -nr -C 3 'hello' src