Skip to content

Instantly share code, notes, and snippets.

@adibaba
Last active August 25, 2017 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adibaba/56f887eec9ebcdfa29cbde846680ee44 to your computer and use it in GitHub Desktop.
Save adibaba/56f887eec9ebcdfa29cbde846680ee44 to your computer and use it in GitHub Desktop.

Search

Names

find . -type f -iname '*SEARCH*'

Contents

find ./ -type f -exec grep -H 'SEARCH' {} \;
# https://stackoverflow.com/q/16956810/1543389


grep -iwrno -e "SEARCH" --include='*.FILEEXTENSION' ./
-i  --ignore-case
-w  --word-regexp
-r  --recursive
-n  --line-number
-o  --only-matching
-e pattern  --regexp=pattern
--include


grep -iwrl -e "SEARCH" --include='*.FILEEXTENSION' ./
-l  --files-with-matches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment