Change a Word in Many Files

27 September 2008
by Gavin Colborne

The below one liner will open all files in its path and change the word ‘MOO’ in any of the files to the word ‘BOO’.

find . -type f | xargs /usr/iw-home/iw-perl/bin/iwperl -i -p -e 's/MOO/BOO/g;'

This script has only been lightly tested so please make a backup of your files before running this!

Our Latest News