From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079079016214.tru64-unix-managers.marc@archive.invalid> From: Daniel Clar Date: Wed, 20 Oct 1999 16:51:16 +0000 To: tru64-unix-managers Subject: SUMMARY: ulimit -S -n X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079079016214 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@dcs.rhbnc.ac.uk ++++++++++++++++++++++++++++++++++ lawrence Philip P 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@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@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@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@profc.udec.cl