Skip to content

Instantly share code, notes, and snippets.

@weiofcn
Last active April 13, 2018 01:55
Show Gist options
  • Save weiofcn/5558b43eb3a2b0a0163ceba66953bc3f to your computer and use it in GitHub Desktop.
Save weiofcn/5558b43eb3a2b0a0163ceba66953bc3f to your computer and use it in GitHub Desktop.
rename 's/oldString/newString/' *

比如:before_a_dog.txt替换以后为after_a_dog.txt

sed -i "s/oldString/newString/g"  `grep oldString -rl /path`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment