Replace your text from a file

In Unix, basically you could easily replace all of the specific text to another text without using the editor.

By using replace command, you could replace your text within seconds.

The structure of the replace command will be as below.

replace old_text new_text — file

Example,

replace 127.0.0.1 255.255.255.255 — /var/named/mickgenie.com.db

with the command above, the IP of 127.0.0.1 will change to 255.255.255.255 for file /var/named/mickgenie.com.db.

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.