Last active
April 19, 2018 23:19
-
-
Save DavidMetcalfe/25fd3c876bab0acc18a4e9b865a6b784 to your computer and use it in GitHub Desktop.
Recursively search through files in chosen directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -r = recursive | |
# -n = line number within file | |
# -w = match whole word | |
grep -rnw . -e 'query' # Search current dir in bash. | |
grep -rnw '/path/to/directory/' -e 'query' # Search provided directory in bash. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment