The original posting was
> On Wed, 20 Oct 1999, Daniel Clar wrote:
>
> > Hello,
> >
> > One of our users ask me about these strange results :
> >
> > $ alpha.supelec.fr> csh
> > % ulimit -S -n
> > 4096
> > % alpha.supelec.fr> sh
> > $ ulimit -S -n
> > Usage: ulimit [-H | -S] [-a | -c | -d | -f | -h | -m | -n | -s | -t] [limit]
> >
> >
> > A which ulimit gives the same results /usr/bin/ulimit.
> >
> > What's the trick here ?
>
and here are the numerous answers:
++++++++++++++++++++++++
ulimit is very confusing because there are lots of different versions. All
the Bourne-like shells (sh, ksh, bash etc) have it as a built-in; it has
to be a built-in in order to change the current process's limits. So you
have to look at the various shell man pages to see how to use it (there
are subtle differences).
/usr/bin/ulimit has the same syntax as the ksh version but not the same
functionality. It can read limits but not set them; if you run it it
spawns a process, sets limits for that process then immediately exits. Not
very useful (see /bin/cd for an even more useless command).
csh achieves ulimit functionality with a built-in called limit. See csh
man page (different syntax again).
Sorry if your head is spinning!
Bob
==============================================================
Bob Vickers R.Vickers_at_dcs.rhbnc.ac.uk
++++++++++++++++++++++++++++++++++
lawrence Philip P <Philip.lawrence_at_astrazeneca.com>
see man 1b sh -- Built-In Commands,
unless you specify the full pathname you will probably run the built-in
ulimit
+++++++++++++++++++++++++++++++++++++
It looks like `ulimit' is an sh builtin command (but the `which'
command isn't smart enough to figure that out.) Giving the command
as /bin/ulimit gives the same result, I think.
--
-- Paul A. Sand | That'll teach me to grep from the FAQ...
-- University of New Hampshire | (Paul Southworth, comp.unix.osf.osf1)
-- pas_at_unh.edu
+++++++++++++++++++++++++++++++++++++++++
I believe ulimit is a built in command for the sh shell, which implies
the csh version is /usr/bin/ulimit. But of course you can verify by
doing a which ulimit under csh and comparing to /usr/bin/ulimit with
path given explicitly.
Tom Payerle
Dept of Physics payerle_at_physics.umd.edu
++++++++++++++++++++++++++++++++++++++++++
ulimit is a built-in command in csh...
[62]<11:12am>sto> which limit
limit: shell built-in command.
let me guess is /usr/bin/ulimit a ksh script that fronts for limit
[61]<10:42am>sto> file /usr/bin/ulimit
/usr/bin/ulimit: a /usr/bin/ksh script text
YEP!
S
--
-----------------------------------------------------------------------
Sean O'Connell Email: sean_at_stat.Duke.EDU
+++++++++++++++++++++++++++++++
Some shells have their own ulimit program built-in.
Try /usr/bin/ulimit (not just ulimit) in both and you should the
same results
Salvador Ramirez Flandes PROFC, Universidad de Concepcion, CHILE
http://www.profc.udec.cl/~sram mailto:sram_at_profc.udec.cl
Received on Wed Oct 20 1999 - 16:55:44 NZDT