tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Bainbridge <>
Subject Re: Link issue after change server
Date Fri, 30 May 2003 09:19:29 GMT
On Fri, 30 May 2003 12:53, Cui Xiaojing-a13339 wrote:
> Hello All,
> I need to move much HTML files from one server to another server. But in
> these HTML files, there are lot of link with complete path. For example,
> using http://<servername>/File1/file.html. Due to the two servers have
> different <servername>, so need to change the <servername> or change the
> complete path to relative path after moving. But due to have so many links,
> it will need so many time to change it. Are there any other method to solve
> the issue? Thanks a lot.

Either use an IDE with a search and replace function for multiple files or if 
you have Perl and one of the unix shells try the following from the top level 

find . -name "*.html" -print | xargs perl -pi.bak -e 's/oldserver/newserver/g'

This will do the replacements and create .bak backup files to remove the 
.bak's run:

 find . -type f -name \*.bak -exec rm {} \;

Nb. I haven't tested these particular statements but have similar ones that 
work like a dream in my toolkit at work. :)

Jason Bainbridge
KDE Web Team - 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message