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’ {} \;


LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter picture

LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter

$8.89



Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter XL830L USA picture

Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter XL830L USA

$8.75



LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter picture

LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter

$11.99



Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter XL830L USA picture

Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter XL830L USA

$8.85



DC 100V 10A Voltmeter Ammeter LED Dual Volt Amp Meter Voltage Current Tester picture

DC 100V 10A Voltmeter Ammeter LED Dual Volt Amp Meter Voltage Current Tester

$6.95



100A AC Volt Meter Ammeter Energy Power Voltage Meter LCD Display Monitor Panel picture

100A AC Volt Meter Ammeter Energy Power Voltage Meter LCD Display Monitor Panel

$17.09



DC 100V 100A Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt picture

DC 100V 100A Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt

$12.99



Mini DC 100V 10A Digital Voltmeter Ammeter Blue Red LED Volt Amp Meter Gauge US picture

Mini DC 100V 10A Digital Voltmeter Ammeter Blue Red LED Volt Amp Meter Gauge US

$6.95



100A AC LCD Digital Volt Watt Power Voltage Meter Monitor KWh Voltmeter Ammeter picture

100A AC LCD Digital Volt Watt Power Voltage Meter Monitor KWh Voltmeter Ammeter

$16.95



Electric AC/DC Voltage Detector Pen Tester 6-380V Voltmeter Ammeter Circuit 8in1 picture

Electric AC/DC Voltage Detector Pen Tester 6-380V Voltmeter Ammeter Circuit 8in1

$7.49



Powered by WordPress. Designed by WooThemes