grep -lr -e '' * | xargs sed -i 's///g' This command broken down: * grep for the word in a files, use recursion (to find files in sub directories), and list only file matches * | xargs passes the results from the grep command to sed * sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace) ========================= Perl provides a really nice one-line for this kind of thing: perl -p -i -e ’s///g’ * It also provides the option of creating a backup of each file changed: perl -p -i.bak -e ’s///g’ * http://www.linux.org/lessons/short/perlpie/perl_pie.html