Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
\section ulimit ulimit - set or get resource usage limits
2005-10-15 11:11:39 +00:00
\subsection ulimit-synopsis Synopsis
<tt>ulimit [OPTIONS] [LIMIT]</tt>
\subsection ulimit-description Description
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
\c ulimit builtin sets or outputs the resource usage limits of the
shell and any processes spawned by it. If a new limit value is
omitted, the current value of the limit of the resource is printed; otherwise,
the specified limit is set to the new value.
2007-01-12 15:15:40 +00:00
Use one of the following switches to specify which resource limit to set or report:
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
- <code>-c</code> or <code>--core-size</code>: the maximum size of core files created. By setting this limit to zero, core dumps can be disabled.
- <code>-d</code> or <code>--data-size</code>: the maximum size of a process' data segment.
- <code>-f</code> or <code>--file-size</code>: the maximum size of files created by the shell.
- <code>-l</code> or <code>--lock-size</code>: the maximum size that may be locked into memory.
- <code>-m</code> or <code>--resident-set-size</code>: the maximum resident set size.
- <code>-n</code> or <code>--file-descriptor-count</code>: the maximum number of open file descriptors (most systems do not allow this value to be set).
- <code>-s</code> or <code>--stack-size</code>: the maximum stack size.
- <code>-t</code> or <code>--cpu-time</code>: the maximum amount of CPU time in seconds.
- <code>-u</code> or <code>--process-count</code>: the maximum number of processes available to a single user.
- <code>-v</code> or <code>--virtual-memory-size</code> The maximum amount of virtual memory available to the shell.
2005-10-15 11:11:39 +00:00
2007-01-12 15:15:40 +00:00
Note that not all these limits are available in all operating systems.
The value of limit can be a number in the unit specified for
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
the resource or one of the special values <tt>hard</tt>, <tt>soft</tt>, or <tt>unlimited</tt>,
2007-01-12 15:15:40 +00:00
which stand for the current hard limit, the current soft limit, and no
2010-09-18 02:18:26 +00:00
limit, respectively.
2007-01-12 15:15:40 +00:00
2005-10-15 11:11:39 +00:00
If limit is given, it is the new value of the specified resource. If
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
no option is given, then \c -f is assumed. Values are in kilobytes,
except for \c -t, which is in seconds and \c -n and \c -u, which are unscaled
2005-10-15 11:11:39 +00:00
values. The return status is 0 unless an invalid option or argument is
supplied, or an error occurs while setting a new limit.
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
\c ulimit also accepts the following switches that determine what type of
2007-08-01 17:35:24 +00:00
limit to set:
2007-01-12 15:15:40 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
- <code>-H</code> or <code>--hard</code> sets hard resource limit
- <code>-S</code> or <code>--soft</code> sets soft resource limit
2007-01-12 15:15:40 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
A hard limit can only be decreased. Once it is set it cannot be
2007-03-24 19:16:46 +00:00
increased; a soft limit may be increased up to the value of the hard
limit. If neither -H nor -S is specified, both the soft and hard
limits are updated when assigning a new limit value, and the soft
limit is used when reporting the current value.
2007-01-12 15:15:40 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
The following additional options are also understood by <tt>ulimit</tt>:
2007-01-12 15:15:40 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
- <code>-a</code> or <code>--all</code> prints all current limits
- <code>-h</code> or <code>--help</code> displays help and exits.
2007-01-12 15:15:40 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
The \c fish implementation of \c ulimit should behave identically to the
2007-01-12 15:15:40 +00:00
implementation in bash, except for these differences:
2005-10-15 11:11:39 +00:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
- Fish \c ulimit supports GNU-style long options for all switches
- Fish \c ulimit does not support the \c -p option for getting the pipe size. The bash implementation consists of a compile-time check that empirically guesses this number by writing to a pipe and waiting for SIGPIPE. Fish does not do this because it this method of determining pipe size is unreliable. Depending on bash version, there may also be further additional limits to set in bash that do not exist in fish.
- Fish \c ulimit does not support getting or setting multiple limits in one command, except reporting all values using the -a switch
2005-10-15 11:11:39 +00:00
\subsection ulimit-example Example
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
<tt>ulimit -Hs 64</tt> sets the hard stack size limit to 64 kB.
2005-10-15 11:11:39 +00:00