find . -name '*.html' -type -f -print0 | \ xargs -0 -n 50 perl -pi -e 's/foo/bar/g'