How do I find and replace every occurrence of:
subdomainA.example.com
with
subdomainB.example.com
in every text file under the /home/www/
directory tree recursively?
How do I find and replace every occurrence of:
subdomainA.example.com
with
subdomainB.example.com
in every text file under the /home/www/
directory tree recursively?
If you wanted to use this without completely destroying your SVN repository, you can tell 'find' to ignore all hidden files by doing:
Note: Do not run this command on a folder including a git repo - changes to .git could corrupt your git index.
From
man find
:All the tricks are almost the same, but I like this one:
find <mydir>
: look up in the directory.-type f
:-exec command {} +
:This one is compatible with git repositories, and a bit simpler:
Linux:
Mac:
(Thanks to http://blog.jasonmeridth.com/posts/use-git-grep-to-replace-strings-in-files-in-your-git-repository/)
A simpler way is to use the below on the command line