CompTIA Linux+ (XK0-004) — Question 311
An administrator notices that a long-running script, /home/user/script.sh, is taking up a large number of system resources. The administrator does not know the script's function. Which of the following commands should the administrator use to minimize the script's impact on system resources?
Answer options
- A. renice
- B. kill
- C. bg
- D. nohup
Correct answer: A
Explanation
The correct answer is A, renice, as it allows the administrator to change the priority of the running script, thus reducing its resource usage. Option B, kill, would terminate the script entirely, which may not be desirable if its function is unknown. Option C, bg, would move the script to the background but wouldn't necessarily reduce its resource consumption. Option D, nohup, would allow the script to continue running even after logout, but it does not address the resource usage issue.