Link to home
Start Free TrialLog in
Avatar of lolaferrari
lolaferrariFlag for United Kingdom of Great Britain and Northern Ireland

asked on

script command required for a change to entire os

I was wondering if anyone can recommend how to traverse my entire OS and every instance of hostnamex  that is found change it to hostname y please on redhat 7


ASKER CERTIFIED SOLUTION
Avatar of ssvl
ssvl
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

@lolaferrari - did you try the above before accepting? When you use sed to replace some text in a file you have to add the -i parameter, like this:

sed -i 's/hostnamex/hostnamey/g'


I would first try on a test folder with some files in it btw.