The nice command is used to run a command with a modified scheduling priority, which affects how much CPU time the command receives. The priority can be specified by the -n option, which takes an integer value between -20 and 19, where lower values indicate higher priority. By default, the nice value is incremented by 10, which means the command runs with lower priority than normal. Only the superuser can specify a negative increment, which means the command runs with higher priority than normal. For example, the command nice -n 5 date runs the date command with a priority of 5, while the command nice -n -10 ls runs the ls command with a priority of -10, but only if the user is the superuser. The nice command is useful for running CPU-intensive commands that do not need to finish quickly, or for running commands that need more CPU time than normal. References:
nice - FreeBSD, the manual page for the nice command on FreeBSD.
HowTo: Use ps, kill, nice, and killall To Manage processes in FreeBSD and OS X Unix Operating System - nixCraft, a tutorial on how to use the nice command and other process management commands on FreeBSD and OS X.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit