Skip to content

Instantly share code, notes, and snippets.

@tizee
Created March 4, 2020 14:04
Show Gist options
  • Save tizee/ce78bd98b3fd8ee0835d7b3f29ce3eb4 to your computer and use it in GitHub Desktop.
Save tizee/ce78bd98b3fd8ee0835d7b3f29ce3eb4 to your computer and use it in GitHub Desktop.
find files with patterns
# -r recursively
# -n line number
# -w match whole word
# -e perl pattern
grep -rnw '\path\to\directory' -e 'perl_pattern'
# good question: https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment