Skip to content

Instantly share code, notes, and snippets.

@zhangchenchen
Last active November 8, 2016 01:54
Show Gist options
  • Save zhangchenchen/3e7c510907c824a067965fe993d6f45f to your computer and use it in GitHub Desktop.
Save zhangchenchen/3e7c510907c824a067965fe993d6f45f to your computer and use it in GitHub Desktop.
substitute string in all files in linux
sed -i "s/oldString/newString/g" `grep oldString -rl /etc`
# -i substitute in place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment