Find and replace a string in all the files recursively
Below are some useful commands to find and replace a string in all the files recursively in unix:find . -type f|xargs perl -pi -e 's/source/target/g'
or
find . -type f -exec perl -pi -e 's/source/target/g' {} \;or
find . -type f -exec sed -i 's/source/target/g' {} \;
All the three are logically similar
0 comments: