The nice/renice
commands is used to modify the priority of the program to be executed.
The priority range is between -20 and 19 where 19 is the lowest priority.
- Running cc command in the background with a lower priority than default (slower):
nice -n 15 cc -c *.c &
- Increase the priority to all processes belonging to group "test":
renice --20 -g test
nice [ -Increment| -n Increment ] Command [ Argument ... ]
Short Flag | Long Flag | Description |
---|---|---|
-Increment |
- | Increment is the value of priority you want to assign. |
-n Increment |
- | Same as -Increment |