Recursively search and replace text in multiple files from the linux command line

Sometimes it’s easier to replace text from the command line rather than your favourite editor, especially if you want to blanket change configuration settings quickly and easily on a server.

find /path_to_files -name "*.js" -print | xargs sed -i 's/replacethis/replacewith/g'

Dont forget that forward slashes / must be escaped with backslashes \ in search and replace strings.