...

Replace – Helpful linux command reference

gorilla-chimp

The replace command is a very simple but VERY powerful command that comes as part of mysql. It can be used to quickly replace entries within a group of files. Generally I find it useful for mass-modification of an IP for dns or TTL for dns.

The general format:
replace a b b a — file1 file2
In english:
replace 14400 3600 — /var/named/*db*
Where 14400 is the old term and 3600 is the term you want to replace it with. The *db* just means it does it to any file with db in the name in the /var/named/ directory.

Discover more from WIREDGORILLA

Subscribe now to keep reading and get access to the full archive.

Continue reading