1833325 Members
2719 Online
110051 Solutions
New Discussion

Re: ulimit and ksh

 
Carter Jay
Advisor

ulimit and ksh

Hello,

I'm trying to use ulimit under ksh, with the -a option (ulimit -a), but I've got an error message. Back in sh, this works very well.
Is this normal (sh_posix != ksh) ?
Is there a tool under ksh to perform the same job.

Thanks in advance
Regards

Jerome
6 REPLIES 6
Ravi_8
Honored Contributor

Re: ulimit and ksh

Hi,
ulimit will be set to unlimited in sh(posix), whereas in ksh ulimit will be set to a value.
hence the error.
never give up
Ravi_8
Honored Contributor

Re: ulimit and ksh

Hi,
ulimit will be set to unlimited in sh(posix), whereas in ksh ulimit will be set to a value.
hence the error. there is no tool under ksh to perform the same.
never give up
Carter Jay
Advisor

Re: ulimit and ksh

Hi,

here is the error message from ulimit...

# ulimit -a
ksh: ulimit: bad option(s)

Could help?

Regards

Jerome
Steve Steel
Honored Contributor

Re: ulimit and ksh

Hi

KSH is much older

For ksh 4194304 represents 'unlimited'.
The posix shell uses the characetr string 'unlimited' instead.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Darrell Allen
Honored Contributor

Re: ulimit and ksh

Hi Jerome,

-a is not a valid option for ksh's built-in ulimit command.

man ksh and look for ulimit.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James R. Ferguson
Acclaimed Contributor

Re: ulimit and ksh

Hi Jerome:

If you look at the man pages for 'ksh' you will find that 'ulimit' is much more limited (no pun intended) than the POSIX shell version.

The POSIX shell (/sbin/sh or /usr/bin/sh) is a superset of the Korn shell (ksh). I would urge you to use the POSIX shell in lieu of the Korn one.

Whatever you choose, however, *never* change root's shell from '/sbin/sh' to anything else! Failure to heed this advice will leave you with an unbootable system.

Regards!

...JRF...