Taken from http://www.ccm.ece.vt.edu/~lscharf/samd/?topic=Linux&title=Search+and+replace+in+multiple+flies : Search and replace in multiple flies Keywords: Date Created: 2002-11-22 Author: Matt Learn and Luke Scharf Problem: To search and replace a string in a group of files. This is a classic application of Unix text processing, but what is the best way? One-line solution: If you have Perl, there is an easy answer: perl -pi -e 's///g' * This is preferable to using sed because it will write the changes back to the original file; you don't have to "mv file.fixed file.orig".