The ulimit Command

   

Korn Shell: Unix and Linux Programming Manual, Third Edition, The
By Anatole Olczak

Table of Contents
Chapter 9.  Miscellaneous Commands


The ulimit Command

The ulimit command manipulates system resource limits for current and child processes using the following format:

 ulimit [options] 

or

 ulimit [options] n 

where n indicates to set a resource limit to n (except with the a option). If n is not given, the specified resource limit is displayed. If no option is given, the default f (file size limit) is used. Here, all the current resource limits are displayed:

 $ ulimit  a  time(seconds)    unlimited  memory(kbytes)   unlimited  data(kbytes)     4294901761  stack(kbytes)    2048  file(blocks)     unlimited  coredump(blocks) unlimited 

This command sets the core dump size limit to 500 blocks:

 $ ulimit  c 500 

To disable generation of core dumps, the dump size should be set to 0 blocks:

 $ ulimit  c 0 

To display the current file size write limit, use ulimit without arguments:

 $ ulimit  unlimited 

Table 9.1 lists the ulimit options. If a size argument is not given, the current limit is displayed.

Table 9.1. ulimit Options

a

displays all the current resource limits

c n

set the core dump size limit to n 512-byte blocks

d n

set the data area size limit to n kilobytes

f n

set the child process file write limit to n 512-byte blocks (default)

m n

set the physical memory size limit to n kilobytes

s n

set the stack area size limit to n kilobytes

t n

set the process time limit to n seconds

The ulimit command is system dependent. Some systems may have different resource limits, and some may not allow changing resource limits. Check your local system documentation for discrepancies.


       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net