Search and replace text in all files of a linux directory Search and replace text in all files of a linux directory linux linux

Search and replace text in all files of a linux directory


The following will do it:

sed -i 's/old_link/new_link/g' file...

Don't forget to escape any slashes, dots, and any other regex special chars in the link addresses with a backslash.


Also, try:

perl -p -i -e <regex> <folder>