find /the/start/dir -type f -exec perl -i~ \ -e 's/origtext/changedtext/g;print' {} \; #### find /the/start/dir -type f -name '*.html' ...