LIMIT(1) BSD Reference Manual LIMIT(1)NAME
limit, unlimit - change process limits
SYNOPSISlimit [-h] [resource [maximum-use]]
unlimit [resource]
DESCRIPTION
The limit command limits the consumption by the current process and each
process it creates to not individually exceed maximum-use of the speci-
fied resource. If maximum-use is not specified, then the current limit is
printed; if resource is not specified, then the current limits on all re-
sources are displayed.
The unlimit command sets the consumption of the specified resource by the
current process and each process it creates to the maximum value, or un-
limited if there is no maximum value. If resource is not specified, then
the limits on all resources are set to their maximum value.
The following options are available:
-h If the -h option is specified, the hard limits are used instead
of the current limits. The hard limits impose a ceiling on the
values of the current limits. Only the super-user may raise the
hard limits, but a user may lower or raise the current limits
within the legal range.
Controllable resources include:
coredumpsize
The largest size core file that may be created.
cputime
The maximum amount of cpu time to be used by each process.
datasize
The maximum size of the data segment for a process; this defines
how far a program may extend its break with the sbrk(2) system
call.
filesize
The largest size file that may be created.
maxproc
The maximum number of simultaneous processes for this user id.
memorylocked
The maximum size which a process may lock into memory using the
mlock(2) function.
memoryuse
The maximum size to which a process's resident set size may grow.
This imposes a limit on the amount of physical memory to be given
to a process; if memory is tight, the system will prefer to take
memory from processes that are exceeding their declared resident
set size.
openfiles
The maximum number of open files for this process.
stacksize
The maximum size of the stack segment for a process; this defines
how far a program's stack segment may be extended. Stack exten-
sion is performed automatically by the system.
The maximum-use argument may be specified as a (floating point or inte-
ger) number followed by a scale factor. For all limits other than
cputime, the default scale is ``k'' or ``kilobytes'' (1024 bytes). A
scale factor of ``m'' or ``megabytes'' may also be used. For cputime the
default scale is ``seconds''; a scale factor of ``m'' (for minutes) or
``h'' (for hours), or a time of the form ``mm:ss'' giving minutes and
seconds also may be used.
For both resource names and scale factors, unambiguous prefixes of the
names suffice.
The limit and unlimit utilities exit 0 on success, and >0 if an error oc-
curs.
BUGS
The limit and unlimit commands are only available in sh(1) and csh(1).
SEE ALSOcsh(1), sh(1)4th Berkeley Distribution June 5, 1993 2