[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Change ips for 350+ sites



On Thu, 28 Aug 2003 12:56:49 +0200
Jappe Reuling <jappe@xxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
> 
> I need to change ip's on two cobalt raq550 with 350+ websites. As you 
> might guess, i'm not so fond of doing this via the webfrontend. I've 
> search the archives, looked at cmuImport / cmuExport but none will
> work (problem with cmu is that the sites are already there and cmu
> won't change the ip numer). There must be a way to do this via scripts
> and commandline.
> 
> does anybody have any ideas?

we did somthing like this a year ago and I fixed it via the find
command, xargs and a perl oneliner. Cant remember exactly what now.
This was possible because we changed out ip's from xxx.xxx.xxx.ppp to
yyy.yyy.yyy.ppp

a fast one from the memories is somthing like:
find . -exec perl -pi -e "s/xxx\.xxx\.xxx/yyy.yyy.yyy/g" {} \; -print


This will search and replace xxx.xxx.xxx with yyy.yyy.yyy in all files
from the dir you are standing in and recursivly down - dont do this
where you have logs. You should probably also have a check that it is
only non-binary files you edit. 


best regards
Kim Schulz