Find and Replace multiple Unix/Linux Files

Filed under: Linux — December 21, 2005 @ 4:21 pm

Need to do some substitution on multiple files? Try this command:

find ./ -type f -exec sed -i 's/findme/replacewithme/' {} \;

1 Comment

  1. Greg:

    or you could do:

    perl -p -i -e ’s/findme/replacewithme/g’ filenames

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.