Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Apropos / Subsearch:
optional field

nice(1)								      nice(1)


  nice - Runs a	command	at a different priority


  Current syntax

  nice [-n priority] command [argument...]

  Obsolescent syntax

  nice [-priority] command [argument...]


       The C shell has a built-in version of the nice command.	If you are
       using the C shell, and want to guarantee	that you are using the com-
       mand described here, you	must specify the full path /usr/bin/nice.
       See the csh(1) reference	page for a description of the built-in com-


  Interfaces documented	on this	reference page conform to industry standards
  as follows:

  nice:	 XCU5.0

  Refer	to the standards(5) reference page for more information	about indus-
  try standards	and associated tags.


  -n priority
      Specifies	how the	system scheduling priority of the executed utility is
      adjusted.	 The priority argument is a positive or	negative decimal

      Positive priority	values cause a lower or	unchanged system scheduling

      Negative priority	values might require appropriate privileges and	cause
      a	higher or unchanged system scheduling priority.

      Specifies	how the	system scheduling priority of the executed utility is
      adjusted.	 (Obsolescent)


      The name of a utility that is to be invoked.

      Any string to be supplied	as an argument to the utility named by the
      command operand.


  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.

  [Tru64 UNIX]	If you have superuser authority, you can run commands at a
  higher priority by specifying	priority as a negative number; for example,


  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.


  The nice command returns the following exit values:

      An error occurred	in the nice utility.

  126 The specified command was	found but could	not be invoked.

  127 The specified command could not be found.


   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 terminal 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 -n 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 (ksh and	sh only), enter:
	    nice -n -10	 wall  <&lt;<&lt;end
	    System shutdown in 2 minutes!

       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 com-
       mand runs at the	normal priority.

       The <&lt;<&lt;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(1) reference page.


  The following	environment variables affect the execution of nice:

      Provides a default value for the internationalization variables that
      are unset	or null. If LANG is unset or null, the corresponding value
      from the default locale is used.	If any of the internationalization
      variables	contain	an invalid setting, the	utility	behaves	as if none of
      the variables had	been defined.

      If set to	a non-empty string value, overrides the	values of all the
      other internationalization variables.

      Determines the locale for	the interpretation of sequences	of bytes of
      text data	as characters (for example, single-byte	as opposed to multi-
      byte characters in arguments).

      Determines the locale for	the format and contents	of diagnostic mes-
      sages written to standard	error.

      Determines the location of message catalogues for	the processing of

      Determines the search path used to locate	the command invoked.


  Commands:  csh(1), nohup(1), renice(8)

  Functions:  nice(3), setpriority(2)

  Standards:  standards(5)