Which of the following commands can he use to disable history?

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based
network. John is working as a root user on the Linux operating system. He is configuring the
Apache Web server settings. He does not want the commands being used in the settings to be
stored in the history. Which of the following commands can he use to disable history?

John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux-based
network. John is working as a root user on the Linux operating system. He is configuring the
Apache Web server settings. He does not want the commands being used in the settings to be
stored in the history. Which of the following commands can he use to disable history?

A.
history !!

B.
set +o history

C.
history !N

D.
set -o history

Explanation:

According to the scenario, John can use the set +o history command to disable history.
Answer option D is incorrect. John cannot use the set -o history command to accomplish his task.
This command is used to enable disabled history.
Answer option A is incorrect. John cannot use the history !! command to accomplish his task. This
command is used to see the most recently typed command.
Answer option C is incorrect. John cannot use the history !N command to accomplish his task.
This command is used to display the Nth history command.
What is the history command?
In the bash shell, the history command is used to view the recently executed commands. History is
on by default. A user can turn off history using the command set +o history and turn it on using set
-o history. An environment variable
HISTSIZE is used to inform bash about how many history lines should be kept. The following
commands are frequently used to view and manipulate history:



Leave a Reply 0

Your email address will not be published. Required fields are marked *