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

NAME

12       ulimit - set or report file size limit
13

SYNOPSIS

15       ulimit [-f][blocks]
16

DESCRIPTION

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

OPTIONS

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

OPERANDS

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

STDIN

40       Not used.
41

INPUT FILES

43       None.
44

ENVIRONMENT VARIABLES

46       The  following  environment  variables  shall  affect  the execution of
47       ulimit:
48
49       LANG   Provide a default value for the  internationalization  variables
50              that  are  unset  or  null.  (See the Base Definitions volume of
51              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
52              ables  for the precedence of internationalization variables used
53              to determine the values of locale categories.)
54
55       LC_ALL If set to a non-empty string value, override the values  of  all
56              the other internationalization variables.
57
58       LC_CTYPE
59              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 error.
66
67       NLSPATH
68              Determine the location of message catalogs for the processing of
69              LC_MESSAGES .
70
71

ASYNCHRONOUS EVENTS

73       Default.
74

STDOUT

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

STDERR

90       The standard error shall be used only for diagnostic messages.
91

OUTPUT FILES

93       None.
94

EXTENDED DESCRIPTION

96       None.
97

EXIT STATUS

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

CONSEQUENCES OF ERRORS

107       Default.
108
109       The following sections are informative.
110

APPLICATION USAGE

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

EXAMPLES

127       Set the file size limit to 51200 bytes:
128
129
130              ulimit -f 100
131

RATIONALE

133       None.
134

FUTURE DIRECTIONS

136       None.
137

SEE ALSO

139       The System Interfaces volume of IEEE Std 1003.1-2001, ulimit()
140
142       Portions of this text are reprinted and reproduced in  electronic  form
143       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
144       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
145       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
146       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
147       event of any discrepancy between this version and the original IEEE and
148       The Open Group Standard, the original IEEE and The Open Group  Standard
149       is  the  referee document. The original Standard can be obtained online
150       at http://www.opengroup.org/unix/online.html .
151
152
153
154IEEE/The Open Group                  2003                           ULIMIT(1P)
Impressum