Blog Details

  • Home
  • Perl
  • Unix find and replace text within all files within a directory
ptitle-particle1

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’

Cart

No products in the basket.