Find and replace string using VI editor

Open file in VI
vi filename
esc
:%s/old string/new String/

How to replace a string using sed command.

cd /folder/

sed -i ‘s/string_to_be_replaced/new string/g’ *               —> Without SPACES in between.

cd /var/named/

sed -i ‘s/86400/300/g’ *.db