Last active
January 1, 2016 23:29
-
-
Save serpent403/8217186 to your computer and use it in GitHub Desktop.
Handy Linux Commands
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
# String replacement across multiple files | |
# '' -e done for osx | |
grep -rl string1 * | xargs sed -i '' -e 's/string1/string2/g' | |
# Search (options : recursive, case insensitive, line number, directories to exclude) | |
grep -r -i -n --exclude-dir={log,tmp,config,spec} 'search-string' * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment