How to do a recursive find replace in debian

  • sgrayban
  • 06/20/07
  • Offline
Posted: Sat, 2009-07-25 21:40

There is a nice little program I recently ran into in the debian repo called "rpl".

rpl - replace strings in files.

apt-get install rpl

What this program can do is this....

rpl -R -x ini "zlib.output_compression = On" "zlib.output_compression = Off" *

You run this in the folder you want to start in, in this case I was in /home

Which is exactly what sed/perl can do but much easier for the newbie. Came in handy for me when I needed to mass replace the On to Off in the php.ini files for zlib compression.