Managing /var Partition and Script Consumption | Exam XK0-004

Verifying and Managing /var Partition in Linux Terminal

Question

After starting a long-running script, a systems administrator needs to verify the frequency of what is filling up the /var partition and kill it because it is consuming too much space.

Which of the following is the correct sequence given only a terminal is available?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

The correct sequence to verify the frequency of what is filling up the /var partition and kill it because it is consuming too much space, given only a terminal is available, is as follows:

D. 1. CTRL-Z 2. bg 3. watch df /var 4. CTRL-Z 5. fg 6. CTRL-C.

Here is a detailed explanation of each step:

  1. CTRL-Z: This command will suspend the currently running script and put it in the background.

  2. bg: This command will start the suspended script in the background, allowing it to continue running.

  3. watch df /var: This command will continuously display the disk usage of the /var partition so that the administrator can monitor the amount of space being consumed.

  4. CTRL-Z: This command will suspend the watch command, which is continuously displaying the disk usage of the /var partition.

  5. fg: This command will bring the suspended watch command back to the foreground so that the administrator can continue monitoring the disk usage.

  6. CTRL-C: This command will terminate the watch command, allowing the administrator to free up the terminal and take any necessary actions to free up space on the /var partition.

Overall, this sequence of commands allows the administrator to monitor the disk usage of the /var partition while allowing the long-running script to continue running. When the administrator identifies the process consuming too much space, they can take appropriate action to free up space.