4th Floor, 4 Tabernacle Street London EC2A 4LU

Unix find and replace text within all files within a directory

Trying to do a search on an entire directory, finding all the instances of the text “applicationX” and replacing all instances with the text “applicationY”.

find /path/to/start/from/ -type f | xargs perl -pi -e ‘s/applicationX/applicationY/g’