Handy little Perl one liner example to find and replace text across multiple files/directories… as an example, to change every .php file recursively from the current directory, changing “find this” to “replace with this”:
find . -name '*.php' -print0 | xargs -0 perl -pi -e 's/find this/replace with this/g'
Leave a Comment