ULIMIT(1POSIX)
π ULIMIT(1POSIX) β the POSIX Programmer's Manual one
okay so bestie, we're in the POSIX Programmer's Manual, section 1POSIX, and the star of the show is ulimit. buckle up π
πΈ PROLOG πΈ
so like, this manual page is part of the POSIX Programmer's Manual. but heads up: the Linux implementation of this interface may differ (so pls go check the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may not even be implemented on Linux at all. it's giving "read the room, read your platform" β¨
π NAME π
ulimit β set or report file size limit. that's the whole vibe. π
π¦ SYNOPSIS π¦
ulimit [-f] [blocks]
π DESCRIPTION π
so the ulimit utility shall set or report the file-size writing limit imposed on files written by the shell and its child processes. and no, reading isn't restricted β files of any size may be read. only a process with appropriate privileges can increase the limit, so like, know your power level π₯
β¨ OPTIONS β¨
the ulimit utility shall conform to the Base Definitions volume of POSIX.1β2017, Section 12.2, Utility Syntax Guidelines. yes, the guidelines, we respect them.
the following option shall be supported:
-fβ Set (or report, if no blocks operand is present), the file size limit in blocks. the-foption shall also be the default case. so it's the main character AND the understudy, iconic π
π OPERANDS π
the following operand shall be supported:
- blocks β The number of 512-byte blocks to use as the new file size limit. yes, 512-byte blocks, not vibes. π
π STDIN π
Not used. she doesn't take input from stdin, she's busy.
π INPUT FILES π
None. nope, zero, nada.
π§ ENVIRONMENT VARIABLES π§
the following environment variables shall affect the execution of ulimit:
LANGβ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ If set to a non-empty string value, override the values of all the other internationalization variables. she overrides everything, periodt.LC_CTYPEβ Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESβ Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.NLSPATHβ Determine the location of message catalogs for the processing ofLC_MESSAGES.
π«Ά ASYNCHRONOUS EVENTS π«Ά
Default. nothing fancy.
β STDOUT β
the standard output shall be used when no blocks operand is present. if the current number of blocks is limited, the number of blocks in the current limit shall be written in the following format:
"%d\n", <number of 512-byte blocks>
and if there is no current limit on the number of blocks, in the POSIX locale the following format shall be used:
"unlimited\n"
unlimited, the dream πβ¨
π STDERR π
the standard error shall be used only for diagnostic messages. only. for. diagnostics.
πΈ OUTPUT FILES πΈ
None. nothing written to files, she just talks.
π EXTENDED DESCRIPTION π
None. there's literally nothing here, moving on bestie.
π₯ EXIT STATUS π₯
the following exit values shall be returned:
0β Successful completion. slay.>0β A request for a higher limit was rejected or an error occurred. π
π¦ CONSEQUENCES OF ERRORS π¦
Default.
the following sections are informative. (so like, the juicy context-y bits, not the rules-rules.)
π APPLICATION USAGE π
since ulimit affects the current shell execution environment, it is always provided as a shell regular built-in. so if it's called in a separate utility execution environment, such as one of the following:
nohup ulimit -f 10000
env ulimit 10000
it does not affect the file size limit of the caller's environment. it's giving "wrong room, wrong party" π
also, once a limit has been decreased by a process, it cannot be increased (unless appropriate privileges are involved), even back to the original system limit. that's a one-way door, no cap. πͺ
β¨ EXAMPLES β¨
set the file size limit to 51200 bytes:
ulimit -f 100
π§ RATIONALE π§
None. no reasoning given, we simply trust.
π FUTURE DIRECTIONS π
None. the future is undefined and honestly that's fine.
π SEE ALSO π
- The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
- The System Interfaces volume of POSIX.1β2017,
ulimit()
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
so yeah, that's the whole thing π«Ά this page is from IEEE / The Open Group, dated 2017, and it's ULIMIT(1POSIX) if you're looking it up again. go set some limits bestie, responsibly π
πΈ
π¦ where this page comes from
- debian bookworm: manpages-posix 2017a-2 Β· Other
- debian trixie: manpages-posix 2017a-2 Β· Other
- ubuntu jammy: manpages-posix 2017a-2 Β· Other
- ubuntu noble: manpages-posix 2017a-2 Β· Other
- ubuntu resolute: manpages-posix 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms