Skip to content

Find and replace text recursively

2018.04.01
linuxbashcli

Replace text in all matching files under the current directory:

find . -type f -name "*.txt" -exec sed -i 's/old/new/g' {} +