Take the 2-minute tour ×

Many people string together find and sed, or perl, or any number of other unix commands to find and replace across multiple files. But, there's a simple command that can do it for you without the hassle?

Edit: The Digital Ninja points out that it's rpl.

However this is not a built in command but, for debian based distros like Ubuntu you can simply install it with sudo apt-get install rpl

I would guess that it's available through most package managers in other *nix OSs. OS X Users can download a binary at http://www.laffeycomputer.com/rpl.html

share|improve this question
add comment

2 Answers

I think some variation of the following would work :

find . -name *.extension | perl -pi.bak -e "s/text_to_be_replaced/replacement/"
share|improve this answer
well, yes, and I alluded to that, but the point was to find a command that did it without the user having to string together various combinations of unix commands and perl, sed, or anything else. –  masukomi Nov 21 '08 at 16:31
also, it would be perl -pi -e (no .bak) –  masukomi Nov 21 '08 at 16:33
But you can always chain the commands yourself and put it on a simple shell script file. –  Renato Soffiatto Nov 21 '08 at 18:28
add comment

Your Answer


