Quantcast
Channel: vBlog by Viktor Balogh » bash
Viewing all articles
Browse latest Browse all 2

Correct usage of ulimit

$
0
0

The “ulimit” and “limit” commands are often built into the shell, but there may exist some binaries with the same name. For example:

# /usr/local/bin/bash
bash> type ulimit
ulimit is a shell builtin
bash> which ulimit
/usr/bin/ulimit


The command can also alter with the different shells:

# /bin/sh
sh> type ulimit
ulimit is a shell builtin

# /bin/csh
% which limit
builtin/limit

When one of these is a shell built-in, you may not get much useful from running some external program with the same (or a similar) name. Also, the syntax may be different for each of these. In a C shell, I’d suggest using “limit”:

% limit
cputime unlimited
filesize unlimited
datasize 1048576 kbytes
stacksize 8192 kbytes
coredumpsize unlimited
memoryuse 2024568 kbytes
descriptors 4096 files
addressspace 4194304 kbytes

% limit coredumpsize 1000000

% limit
cputime unlimited
filesize unlimited
datasize 1048576 kbytes
stacksize 8192 kbytes
coredumpsize 1000000 kbytes
memoryuse 2024568 kbytes
descriptors 4096 files
addressspace 4194304 kbytes

To learn more about these shell built-ins you can do “man bash”, “man csh”, “man sh”, or “man “.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images