globally replace a file

Wed, Feb 2, 2005

I had this problem when transferring an IntelliJ IDEA project from one machine to another. Although you can specify the CVS access details in the IDE, each and every CVS directory in the project has it’s own pointer to the access details within the IDE to use:


where Root contains the pointer to the CVS access details that are detailed in the IDE:

it was set to this on the source machine: :ext:user@cvs.machine:22:/path/to/cvs/root

and this on the target one: :ssh:user@cvs.machine:22:/path/to/cvs/root

so, I created a file on the target machine: cvs_new_Root, with the contents “:ext:user@cvs.machine:22:/path/to/cvs/root”

and used the Bash commands to replace all occurrences of Root with the new file:

find . -name Root -exec cp cvs_ext_Root {} ;

comments powered by Disqus