CompTIA Linux+ (XK0-004) — Question 15

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?

Answer options

Correct answer: D

Explanation

The correct sequence starts with CTRL-Z to suspend the script, then bg to run it in the background. The command watch df /var allows the administrator to monitor the partition usage, and upon identifying the issue, fg brings the script back to the foreground, where CTRL-C can be used to terminate it. The other options either incorrectly use CTRL-C before suspending the script or do not properly sequence the commands needed to monitor and then terminate the process.