Find and Replace Across Multiple Files

Need to replace broken links across 1000 html files?

If you’re using linux/unix/macosx it’s just fire up the terminal and use this:

find -iname "*.htm" -exec sed -i 's/search/replace/' {} \;

search – is regex(or a string in the simplest form) what you’re looking for

replace – is what you’re replacing your string with

If you’re on Windows, well then it’s a bit more complicated. There is a nice tool – TextCrawler, it’s free and does the trick.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>