Skip to content

Instantly share code, notes, and snippets.

@lanrion
Last active August 29, 2015 14:01
Show Gist options
  • Save lanrion/26f38989fe842c560755 to your computer and use it in GitHub Desktop.
Save lanrion/26f38989fe842c560755 to your computer and use it in GitHub Desktop.
sed 替换指定目录文件下的文件内容

I run this command to find and replace all occurrences of 'apple' with 'orange' in all files in root of my site

find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment