- Find all instances of prefix.hosta
- Change them to prefix.hostb
- Profit!
You're going to have to give a bit more to go on. Do you mean in all files? All system configuration files? (If so a hint at the OS might help) Do you mean in all HTML documents under directory foo?
The cake is a lie.
The cake is a lie.
The cake is a lie.
| [reply] [Watch: Dir/Any] |
The content is the unknown part. Mostly it should referred in application files, html ,js , config files etc, but I cannot say absolutely sure.
| [reply] [Watch: Dir/Any] [d/l] |
The best way may be first telling us what system, which server and many other details. Absent that I can only guess that find / -type f -print | xargs grep 'prefix.hosta' might find all occurences of that string on your hard disk. Blindly substituting them per script is not advisable as you could find false positives in binaries or text documents
| [reply] [Watch: Dir/Any] [d/l] |
I also want to make sure, I don't do anything wrong accidently.
- If you really are doing a system wide change, you will save yourself a lot of pain by doing a
backup of your system before you try such a global change. That way if you clobber a really important file, you can get the original, pre-change, version back.
- Better yet, if all the files that you want to change are under version control, then do the changes in a working copy: check out a clean up-to-date working copy, make the changes, inspect the result, and if you are happy with it, commit the changes.
Best, beth
| [reply] [Watch: Dir/Any] |