CompTIA
XK0-006 · Question #96
A systems administrator is working on configuration changes and needs to replace a hostname in a specific file. Which of the following commands should the administrator use to complete this task?
Sign in or unlock XK0-006 to reveal the answer and full explanation for question #96. The question stem and answer options stay visible for context.
Automation and Scripting
Question
A systems administrator is working on configuration changes and needs to replace a hostname in a specific file. Which of the following commands should the administrator use to complete this task?
Options
- Acut. -d oldhostname /etc/configuration.file | vi newhost.name
- Bsed -i 's/oldhostname/newhostname/' /etc/configuration.file
- Ccat /etc/configuration.file | grep oldhostname > newhost.name
- Dgrep oldhostname /etc/configuration.file | awk '{print $1 newhostname}'
Unlock XK0-006 to see the answer
You've previewed enough free XK0-006 questions. Unlock XK0-006 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#sed#text substitution#in-place editing#configuration files