This section describes the syntax of the /usr/bin/nice command and not the C-shell nice built-in command. For information about the C-shell nice command, see csh(1).
Determine whether you want to lower the priority of a command as a user or raise or lower the priority of a command as superuser and select one of the following:
Follow the examples in step 2 to lower the priority of a command as a user.
Follow the examples in step 3 to raise or lower priorities of a command as superuser.
As a user, lower the priority of a command by increasing the nice number.
The following nice command executes command-name with a lower priority by raising the nice number by 5 units.
$ /usr/bin/nice -5 command-name |
% /usr/bin/nice -n 5 command-name |
The following nice command lowers the priority of command-name by raising the nice number by the default increment of 10 units, but not beyond the maximum value of 39.
% /usr/bin/nice command-name |
As superuser, raise or lower the priority of a command by changing the nice number.
The following nice command raises the priority of command-name by lowering the nice number by 10 units, but not below the minimum value of 0.
# /usr/bin/nice --10 command-name |
In the preceding command, the first minus sign designates that what follows is an option. The second minus sign indicates a negative number.
The following nice command lowers the priority of command-name by raising the nice number by 5 units, but not beyond the maximum value of 39.
# /usr/bin/nice -5 command-name |
For more information, see nice(1).