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


USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD picture

USA Windows VPS RDP Server/ Windows VPS Hosting - 4GB RAM + 150GB HDD

$11.99



8.9x16.4x12.9in. Black 1 Tier Composite Deep Server Rack Cabinet Enclosure Groun picture

8.9x16.4x12.9in. Black 1 Tier Composite Deep Server Rack Cabinet Enclosure Groun

$109.00



MRG-3800V-R 800W Server Power Supply, Untested picture

MRG-3800V-R 800W Server Power Supply, Untested

$249.99



Used & Tested FSP FSP300-701UJ Server Power Supply picture

Used & Tested FSP FSP300-701UJ Server Power Supply

$153.58



Server Books for Waitress - Glitter Leather Waiter Book Server Wallet with Zi... picture

Server Books for Waitress - Glitter Leather Waiter Book Server Wallet with Zi...

$13.16



Server Book with 2 Zipper Pockets Leather Server Books for Waitress picture

Server Book with 2 Zipper Pockets Leather Server Books for Waitress

$12.15



Server Book - Leather Server Books for Waitress .Waitress Book Organizer with Cl picture

Server Book - Leather Server Books for Waitress .Waitress Book Organizer with Cl

$11.32



SERVER PRODUCTS 3QT STAINLESS STEEL JAR / POT picture

SERVER PRODUCTS 3QT STAINLESS STEEL JAR / POT

$49.95



CAMBRO Insulated Beverage Server Container 4.75 Gallon Blue picture

CAMBRO Insulated Beverage Server Container 4.75 Gallon Blue

$46.99



NEW Moxa NPORT 5650-8-DT RS232 422 485 Device Server picture

NEW Moxa NPORT 5650-8-DT RS232 422 485 Device Server

$864.23



Powered by WordPress. Designed by WooThemes