Recursively find and replace within a directory
Replaces all occurences of a string recursively within a directory
Authored by: Anatolyold_text
file_path
new_text
Command
Copy
grep -rl old_text file_path | xargs sed -i '' 's/old_text/new_text/g'
Tags
Edit in GitHub
Copied