Last active
May 17, 2016 17:41
-
-
Save scottnath/3750842 to your computer and use it in GitHub Desktop.
find text inside a file on command line
This file contains 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
find . -name '*' -exec grep -li 'text_to_search_for' {} \; | |
// ignore directories (won't show ".. is a directory") | |
find . -name '*' -exec grep -sli 'TEXT' {} \; | |
// exclude directories (like `node_modules`) | |
find . -name '*' -not -path './node_modules/*' -exec grep -sli 'TEXT' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment