Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

nohup(1)

nice(3)

setpriority(2)

nice(1)  —  Commands

OSF

NAME

nice − Runs a command at a different priority

SYNOPSIS

nice [−priority] command [argument ...]

DESCRIPTION

The nice command lets you run the specified command at a lower priority.  The value of priority can range from 1 to 19, with 19 being the lowest priority. The default value of priority is 10. 

If you have superuser authority, you can run commands at a higher priority by specifying priority as a negative number; for example, −10. 

EXAMPLES

     1.To run a low priority command in the background, enter:

nice cc −c ∗.c &

This runs the command cc −c ∗.c at low priority in the background.  Your tty is free so that you can run other commands while cc is running.  See the sh command for details about starting background processes with an & (ampersand). 

     2.To specify a very low priority, enter:

nice −15 cc −c ∗.c &

This runs cc in the background at a priority that is even lower than the default priority set by nice. 

     3.To specify a very high priority (sh only), enter:

nice --10 wall <<end
System shutdown in 2 minutes!
end

This runs wall at a higher priority than all user processes.  Doing this slows down everything else running on the system.  If you do not have superuser authority when you run this command, then the wall command runs at the normal priority.  The <<end and end arguments define a Here Document, which uses the text entered before the end line as standard input for the command.  For more details, see the Inline Input (Here) Documents section on the sh reference page. 

NOTES

The csh command contains a built-in subcommand named nice. The command and subcommand do not necessarily work the same way. For information on the subcommand, see the csh command. 

RELATED INFORMATION

Commands: csh(1), nohup(1). 

Functions: nice(3) setpriority(2). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026