Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ulimit(3) [linux man page]

ULIMIT(3)						     Linux Programmer's Manual							 ULIMIT(3)

NAME
ulimit - get and set user limits SYNOPSIS
#include <ulimit.h> long ulimit(int cmd, long newlimit); DESCRIPTION
Warning: This routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit(), see bash(1). The ulimit() call will get or set some limit for the calling process. The cmd argument can have one of the following values. UL_GETFSIZE Return the limit on the size of a file, in units of 512 bytes. UL_SETFSIZE Set the limit on the size of a file. 3 (Not implemented for Linux.) Return the maximum possible address of the data segment. 4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open. RETURN VALUE
On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set appropriately. ERRORS
EPERM A unprivileged process tried to increase a limit. CONFORMING TO
SVr4, POSIX.1-2001. POSIX.1-2008 marks ulimit() as obsolete. SEE ALSO
bash(1), getrlimit(2), setrlimit(2), sysconf(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-08-06 ULIMIT(3)

Check Out this Related Man Page

ULIMIT(3)						     Linux Programmer's Manual							 ULIMIT(3)

NAME
ulimit - get and set user limits SYNOPSIS
#include <ulimit.h> long ulimit(int cmd, long newlimit); DESCRIPTION
Warning: This routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit(), see bash(1). The ulimit() call will get or set some limit for the calling process. The cmd argument can have one of the following values. UL_GETFSIZE Return the limit on the size of a file, in units of 512 bytes. UL_SETFSIZE Set the limit on the size of a file. 3 (Not implemented for Linux.) Return the maximum possible address of the data segment. 4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open. RETURN VALUE
On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set appropriately. ERRORS
EPERM A unprivileged process tried to increase a limit. CONFORMING TO
SVr4, POSIX.1-2001. POSIX.1-2008 marks ulimit() as obsolete. SEE ALSO
bash(1), getrlimit(2), setrlimit(2), sysconf(3) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-08-06 ULIMIT(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Trapping Interrupt From 'ulimit'

I want to know the interrupt passed to a process through 'ulimit' I am running a process which gets killed when the 'ulimit -t' reaches. But after killing the process I want to start another process which would send a message or do some clean up or anything at all. To do the same I am... (5 Replies)
Discussion started by: mrnuttynuts
5 Replies

2. Shell Programming and Scripting

Setting Ulimit

How do i set ulimit for user (4 Replies)
Discussion started by: Krrishv
4 Replies

3. Solaris

ulimit command

Hi, I have a Sun machine 5.8 and would like to modify the ulimit parameter for numner of file descriptors. the output of plimit <process name> is: 4100: process_name resource current maximum time(seconds) unlimited unlimited file(blocks) ... (8 Replies)
Discussion started by: inquirer
8 Replies

4. UNIX for Advanced & Expert Users

ulimit and 64 bits process

as we know, ulimit can be used to limit the stack and heap size of a process occupy. However, the space for 32-bits and 64 bits process are different. for example, "ulimit -s xxxx" only limit the stack size of 32- bits process, am I right? How to limit the size of 64-bits process? thanks a... (5 Replies)
Discussion started by: tommy_cs
5 Replies

5. UNIX for Dummies Questions & Answers

ulimit and /etc/security/limits file permission

Hi there, I am working on AIX and i dont have permission for /etc/security/limits file. In the man page of ulimit it is mentioned that it will get the limitations for me from /etc/security/limits file. the file permission for ulimit command is -r-xr-xr-x 15 bin bin ... (6 Replies)
Discussion started by: quintet
6 Replies

6. UNIX for Advanced & Expert Users

setting ulimit -n with a value more than 1024000

I would like to set the maximum number or open files per process to be greater than 1024000 (for specific application scalability purpose). I am using RHEL 5.3/Ext4. %sysctl fs.file-max fs.file-max = 164766821 I also have added the folloing to /etc/security/limits.conf * ... (7 Replies)
Discussion started by: Hsianglung Wu
7 Replies

7. Shell Programming and Scripting

sudo + ulimit not working ?

When I use sudo with ulimit there is an error but if I use ulimit without sudo there is no error. In bash: user1@debian:~$ sudo -u user2 -H ulimit -S -c unlimited sudo: ulimit: command not found user1@debian:~$ user1@debian:/home/user1$ ulimit -S -c unlimited user1@debian:/home/user1$... (3 Replies)
Discussion started by: cyler
3 Replies

8. Solaris

ulimit

how do i check the ulimit set on my server.. ca i know whats the command ?? thanks in advance .. (5 Replies)
Discussion started by: expert
5 Replies

9. Solaris

Modify ulimit nofiles descriptor

Hi, All I need to increase the ulimit value permanently without changing /etc/system file. i.e nofiles descriptor. For all NIS Users logging in. I know the command to do this: # ulimit -Sn 4096 This change is temporary. So, I went on adding this command in the /etc/profile. ... (6 Replies)
Discussion started by: santh08
6 Replies

10. HP-UX

Individual file size limit on HP-UX

I got a question on ulimit on HP-UX. I have a log file that gets more than 2 GB and the application crashes because it can not write to log. I browsed through the forum and found one very similar post on ulimit but that was not concluded. Did some analysis and below is some output. >getconf... (6 Replies)
Discussion started by: asutoshch
6 Replies

11. Shell Programming and Scripting

Remove lines if some data is the same: Centos5 / bash

Ok what i have is 8 separate files based on how many IP's are associated with the domain. I want to limit duplication of ip's within the individual files (ie. i don't care if the same ip is in 1 IP file and 4 IP file). Can someone help me with how to go through the files and remove lines that have... (3 Replies)
Discussion started by: oly_r
3 Replies

12. Red Hat

ulimit command

In Linux, What is the difference between using this command ulimit -c `ulimit -cH` and ulimit -c `ulimit -Hc` ? Thanks (4 Replies)
Discussion started by: mrn6430
4 Replies

13. AIX

What are the ideal ulimit settings for root user in AIX?

Hi, what are the ideal/best/recommended ulimit settings for a root user in AIX? I understand that it depends on our environment. But I would like to know...what are settings you guys use in your environment for best performance. default: fsize = 2097151 core = 2097151 ... (8 Replies)
Discussion started by: System Admin 77
8 Replies

14. UNIX for Dummies Questions & Answers

String size limit for 'echo'...

Hi guys, man bash doesn't help much here nor does the WWW. (I have discovered there is technically no limit to a bash array.) I am thinking of adding a new full manual inside AudioScope.sh. A few questions here. The main question is, assuming I go ahead with this idea:- Is there a limit... (6 Replies)
Discussion started by: wisecracker
6 Replies

15. UNIX for Advanced & Expert Users

[BASH] Errormessages and Traps with a 'here-doc'

Happy holidays everyone :) I'm trying to increase usabilty for my scripted project-, for that i wanted to apply an error message poping up upon every and any error (other than proper exit) indicating the enduser a uniform, and hopefully readable error messsage. To achieve this, i wrote a... (4 Replies)
Discussion started by: sea
4 Replies