-
-
Save mccurdyc/6272148a13f27f1036050a68bee8b17e to your computer and use it in GitHub Desktop.
find replace filesystem
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
# global grep and replace | |
grep -rl 'old' ./ | xargs sed -i '' 's/old/new/' | |
# global filename grep and replace | |
rename 's/old/new/g' $(find . -name "*old*") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment