1limit [ -hs ] [ resource [ limit ] ] ...
2       Set or display resource limits.  Unless the -s  flag  is  given,
3       the  limit  applies  only  the  children of the shell.  If -s is
4       given without other arguments, the resource limits of  the  cur-
5       rent  shell  is set to the previously set resource limits of the
6       children.
7
8       If limit is not specified, print the  current  limit  placed  on
9       resource,  otherwise  set  the limit to the specified value.  If
10       the -h flag is given, use hard limits instead  of  soft  limits.
11       If no resource is given, print all limits.
12
13       When looping over multiple resources, the shell will abort imme-
14       diately if it detects a badly formed argument.  However,  if  it
15       fails to set a limit for some other reason it will continue try-
16       ing to set the remaining limits.
17
18       resource can be one of:
19
20       addressspace
21              Maximum amount of address space used.
22       aiomemorylocked
23              Maximum amount of memory locked in  RAM  for  AIO  opera-
24              tions.
25       aiooperations
26              Maximum number of AIO operations.
27       cachedthreads
28              Maximum number of cached threads.
29       coredumpsize
30              Maximum size of a core dump.
31       cputime
32              Maximum CPU seconds per process.
33       datasize
34              Maximum data size (including stack) for each process.
35       descriptors
36              Maximum value for a file descriptor.
37       filesize
38              Largest single file allowed.
39       kqueues
40              Maximum number of kqueues allocated.
41       maxproc
42              Maximum number of processes.
43       maxpthreads
44              Maximum number of threads per process.
45       memorylocked
46              Maximum amount of memory locked in RAM.
47       memoryuse
48              Maximum resident set size.
49       msgqueue
50              Maximum number of bytes in POSIX message queues.
51       posixlocks
52              Maximum number of POSIX locks per user.
53       pseudoterminals
54              Maximum number of pseudo-terminals.
55       resident
56              Maximum resident set size.
57       sigpending
58              Maximum number of pending signals.
59       sockbufsize
60              Maximum size of all socket buffers.
61       stacksize
62              Maximum stack size for each process.
63       swapsize
64              Maximum amount of swap used.
65       vmemorysize
66              Maximum amount of virtual memory.
67
68       Which of these resource limits are available depends on the sys-
69       tem.  resource can be abbreviated to any unambiguous prefix.  It
70       can also be an integer, which corresponds to the integer defined
71       for the resource by the operating system.
72
73       If argument corresponds to a number which is out of the range of
74       the  resources  configured into the shell, the shell will try to
75       read or write the limit anyway, and will report an error if this
76       fails.   As  the shell does not store such resources internally,
77       an attempt to set the limit will fail unless the  -s  option  is
78       present.
79
80       limit is a number, with an optional scaling factor, as follows:
81
82       nh     hours
83       nk     kilobytes (default)
84       nm     megabytes or minutes
85       [mm:]ss
86              minutes and seconds
87
88       The  limit  command  is  not  made available by default when the
89       shell starts in a mode emulating another shell.  It can be  made
90       available with the command `zmodload -F zsh/rlimits b:limit'.
91