Skip to content

Instantly share code, notes, and snippets.

@peterdemartini
Created December 4, 2013 17:58
Show Gist options
  • Save peterdemartini/7792316 to your computer and use it in GitHub Desktop.
Save peterdemartini/7792316 to your computer and use it in GitHub Desktop.
Best Find in Files command for Linux. Show lines number, displays results efficiently using less.
#With Extension (PHP)
find . -iname "*.php" -print0 | xargs -0 grep -i -n 'Search Term' | less
#Without Extension
find . -iname "*" -print0 | xargs -0 grep -i -n 'Search Term' | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment