How to use SED to search and replace a string in multiple files in linux

You can use the SED linux command to search and replace a string within all files inside a directory:

This example replaces all occurrences of fast with slow in file names that end in .htm:

$ find ./* -name ‘*.htm*’ -type f -exec sed -i ‘s/fast/slow/g’ {} \;


Vintage Bulb Illumination Fragrance Warmer Wood and Glass picture

Vintage Bulb Illumination Fragrance Warmer Wood and Glass

$24.99



Vintage Bulb Illumination Fragrance Warmer, Black Coastal picture

Vintage Bulb Illumination Fragrance Warmer, Black Coastal

$24.99



Vintage Bulb Illumination Fragrance Warmer Walnut and Rope picture

Vintage Bulb Illumination Fragrance Warmer Walnut and Rope

$24.99



Vintage Meter Gauge Jewell Electrical Instrument Co. Milliamperes DC picture

Vintage Meter Gauge Jewell Electrical Instrument Co. Milliamperes DC

$10.00



Vintage Drill Press Vise picture

Vintage Drill Press Vise

$100.00



Vintage Letterpress wood type large UC Y. Nice old letter picture

Vintage Letterpress wood type large UC Y. Nice old letter

$22.50



Vintage Sharp Wizard Oz-640 Intellisync Personal Organizer 512kb.Needs Batteries picture

Vintage Sharp Wizard Oz-640 Intellisync Personal Organizer 512kb.Needs Batteries

$25.00



Vintage Proto 5431 1/2

Vintage Proto 5431 1/2" Drive Socket 31/32” 12 Point

$14.99



Vintage Morse Set Of 3 3/4-16 Bottoming Taps In Box picture

Vintage Morse Set Of 3 3/4-16 Bottoming Taps In Box

$49.99



Vintage Mayer China Original Pattern Copper Printers Block Made In Pittsburgh PA picture

Vintage Mayer China Original Pattern Copper Printers Block Made In Pittsburgh PA

$174.99



Powered by WordPress. Designed by WooThemes