Linux Foundation Certified System Administrator (LFCS) — Question 9
Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?
Answer options
- A. /usr/bin/prog is executed with a nice level of -5.
- B. /usr/bin/prog is executed with a nice level of 5.
- C. /usr/bin/prog is executed with a priority of -5.
- D. /usr/bin/prog is executed with a priority of 5.
Correct answer: B
Explanation
The command 'nice -5 /usr/bin/prog' sets the scheduling priority of the program when it is executed. A negative nice value indicates a higher priority, thus here, /usr/bin/prog is actually executed with a nice level of 5, making option B correct. Options A, C, and D misinterpret the nice level and the priority settings.