QuestionQ20

Automation, Orchestration, and Scripting

A systems administrator is making configuration changes and must replace a hostname in a particular file. Which command should the administrator use to perform this task?

Explanation

sed -i 's/oldhostname/newhostname/' /etc/configuration.file substitutes newhostname for oldhostname and writes the change directly to the specified file.

Community Discussion

No comments yet. Be the first to start the discussion!