/bin/sh: /bin/sh: arg list is too long
Now I am almost at the end of my list of arguments and extending the
space, if I can, would be the quick and easy solution, otherwise it is
back to creating a convenience library.
Have only be playing with AIX a while, so any info. gladly received.
--
Regards David Murphy, Novell Inc. Ph.801-861 2117, e-mail
dmu...@novell.com
> Is there some environment variable I can set to increase the argument
> list size on AIX. Using AIX v4.3.3, and the script I have is linking a
> lot of object files with libtool, and I run out of space, error is:
>
> /bin/sh: /bin/sh: arg list is too long
I believe that this is a system defined limit, NCARGS in sys/param.h ,
as mentioned in the exec() man page. NCARGS, in turn, is defined to
be the same as ARG_MAX in sys/limits.h, which is 24576 in AIX 4.3.3.
There is also _POSIX_ARG_MAX, which is 4096. I'm not sure if any
system commands use this value. This limit is enforced by exec(), not
by the shell, so I don't think that there is much you can do.
--
Greg Wimpey
David Murphy wrote:
>
> /bin/sh: /bin/sh: arg list is too long
>
> Now I am almost at the end of my list of arguments and extending the
> space, if I can, would be the quick and easy solution, otherwise it is
> back to creating a convenience library.
>
> Have only be playing with AIX a while, so any info. gladly received.
Right, break out the spurs.
It depends on how you supply the arg list. For instance, if you were
to say "# some-cmd /usr/bloodylongname/evenlongernamefornogoodreason/*"
your list could be bloody huge.
IF, however, you
# cd /usr/bloodylongname/evenlongernamefornogoodreason/*
then
# some-cmd *
You may find it's a goer because the repeating of /usr/bloo... doesn't
occur. Testing?
Relatively easy - do an "echo *", "echo /usr/*" or whatever to see
if it fails.
Simon Travaglia
http://bofh.ntk.net
For example lets assume that mycommand only accepts one argument at a time
before it will start generating the "arg list is too long" error.
Then the command
echo too many arguments | xargs -s 1 mycommand
executes
mycommand too
mycommand many
mycommand arguments
Hope this helps.
----------------------------------------------------------------------------
XARGS(1)
NAME
xargs - construct argument list(s) and executes utility
SYNOPSIS
xargs [-0] [-t] [-n number [-x]] [-s size] [utility [argument ...]]
DESCRIPTION
The xargs utility reads space, tab, newline and end-of-file delimited
ar
guments from the standard input and executes the specified utility with
them as arguments.
The utility and any arguments specified on the command line are given
to
the utility upon each invocation,
----------------------------------------------------------------------------
"David Murphy" <dmu...@novell.com> wrote in message
news:3AA673DF...@novell.com...