Using Find, Grep, Awk, or Sed To Rename Server After Cloning
Posted
by
ServerChecker
on Server Fault
See other posts from Server Fault
or by ServerChecker
Published on 2011-06-24T23:41:36Z
Indexed on
2011/06/25
0:24 UTC
Read the original article
Hit count: 518
My client tells me they have cloned a VM in VMWare of an Ubuntu Linux server. Now it's my job to get into all the files and find out what still has the old server name of "bishop" and change it to something else. Also, the IP address is changed and I need to search for that too.
How would you typically use find, grep, awk, or sed to find these files and then change them rapidly? In the end, I want to make a Bash script.
Of course, I'm not expecting you to tell me every file, but just want to know the technique for finding files with "x" in it and then switching that rapidly with "y".
© Server Fault or respective owner