1ULIMIT(1P)                 POSIX Programmer's Manual                ULIMIT(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       ulimit — set or report file size limit
14

SYNOPSIS

16       ulimit [−f] [blocks]
17

DESCRIPTION

19       The ulimit utility shall set or  report  the  file-size  writing  limit
20       imposed on files written by the shell and its child processes (files of
21       any size may be read). Only a process with appropriate  privileges  can
22       increase the limit.
23

OPTIONS

25       The  ulimit  utility  shall  conform  to the Base Definitions volume of
26       POSIX.1‐2008, Section 12.2, Utility Syntax Guidelines.
27
28       The following option shall be supported:
29
30       −f        Set (or report, if no blocks operand is  present),  the  file
31                 size limit in blocks. The −f option shall also be the default
32                 case.
33

OPERANDS

35       The following operand shall be supported:
36
37       blocks    The number of 512-byte blocks to use as  the  new  file  size
38                 limit.
39

STDIN

41       Not used.
42

INPUT FILES

44       None.
45

ENVIRONMENT VARIABLES

47       The  following  environment  variables  shall  affect  the execution of
48       ulimit:
49
50       LANG      Provide a default value for  the  internationalization  vari‐
51                 ables  that are unset or null. (See the Base Definitions vol‐
52                 ume of POSIX.1‐2008, Section 8.2, Internationalization  Vari‐
53                 ables  for  the  precedence of internationalization variables
54                 used to determine the values of locale categories.)
55
56       LC_ALL    If set to a non-empty string value, override  the  values  of
57                 all the other internationalization variables.
58
59       LC_CTYPE  Determine  the  locale for the interpretation of sequences of
60                 bytes of text data as characters (for example, single-byte as
61                 opposed to multi-byte characters in arguments).
62
63       LC_MESSAGES
64                 Determine the locale that should be used to affect the format
65                 and contents  of  diagnostic  messages  written  to  standard
66                 error.
67
68       NLSPATH   Determine the location of message catalogs for the processing
69                 of LC_MESSAGES.
70

ASYNCHRONOUS EVENTS

72       Default.
73

STDOUT

75       The standard output shall be used when no blocks operand is present. If
76       the  current  number  of blocks is limited, the number of blocks in the
77       current limit shall be written in the following format:
78
79           "%d\n", <number of 512-byte blocks>
80
81       If there is no current limit on the number  of  blocks,  in  the  POSIX
82       locale the following format shall be used:
83
84           "unlimited\n"
85

STDERR

87       The standard error shall be used only for diagnostic messages.
88

OUTPUT FILES

90       None.
91

EXTENDED DESCRIPTION

93       None.
94

EXIT STATUS

96       The following exit values shall be returned:
97
98        0    Successful completion.
99
100       >0    A request for a higher limit was rejected or an error occurred.
101

CONSEQUENCES OF ERRORS

103       Default.
104
105       The following sections are informative.
106

APPLICATION USAGE

108       Since  ulimit  affects  the  current shell execution environment, it is
109       always provided as a shell regular built-in. If it is called in a sepa‐
110       rate utility execution environment, such as one of the following:
111
112           nohup ulimit −f 10000
113           env ulimit 10000
114
115       it does not affect the file size limit of the caller's environment.
116
117       Once  a  limit  has been decreased by a process, it cannot be increased
118       (unless appropriate privileges are involved), even back to the original
119       system limit.
120

EXAMPLES

122       Set the file size limit to 51200 bytes:
123
124           ulimit −f 100
125

RATIONALE

127       None.
128

FUTURE DIRECTIONS

130       None.
131

SEE ALSO

133       The  Base  Definitions  volume  of POSIX.1‐2008, Chapter 8, Environment
134       Variables, Section 12.2, Utility Syntax Guidelines
135
136       The System Interfaces volume of POSIX.1‐2008, ulimit()
137
139       Portions of this text are reprinted and reproduced in  electronic  form
140       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
141       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
142       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
143       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
144       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
145       event of any discrepancy between this version and the original IEEE and
146       The  Open Group Standard, the original IEEE and The Open Group Standard
147       is the referee document. The original Standard can be  obtained  online
148       at http://www.unix.org/online.html .
149
150       Any  typographical  or  formatting  errors that appear in this page are
151       most likely to have been introduced during the conversion of the source
152       files  to  man page format. To report such errors, see https://www.ker
153       nel.org/doc/man-pages/reporting_bugs.html .
154
155
156
157IEEE/The Open Group                  2013                           ULIMIT(1P)
Impressum