Re: Parameter list is too long On 22 Apr., 10:53, Hajo Ehlers <serv...@metamodul.com> wrote:
> On Apr 22, 10:30 am, Ashok Sangra <aksan...@gmail.com> wrote:
>
> > On Apr 22, 7:25 am, moonhkt <moon...@gmail.com> wrote:
>
> > > Hi all
> > > When below message prompted. Is it setup user memory by individual
> > > user ?
>
> > > AIX 5.2
>
> > > # ls *.p > $HOME/abc.txt
> > > ksh: /usr/bin/ls: 0403-027 The parameter list is too long.
>
> > > moonhk
>
> > Pls use ls *.p | xargs > $HOME/abc.txt
>
> It will not help since the "*" from " ls *.p " get expanded by the
> shell first. Thus the command which will be executed will be something
> like
> $ ls file1.p file2.p ... fileN.p
> *And if the parameter list is too long you get a Parameter list is too
> long :-)
>
> A solution would be:
> $ ls | grep "\.p$"
>
> cheers
> Hajo
or "find . -name \*.p > SOMEFILE"
if you mind, you can also increase the ARG_MAX (a posix system wide
configuration parameter)
see "getconf ARG_MAX",
which is the memory every process has set aside for cmdline arguments
and environment variables, defaults to 24k on aix
change it globally with "smit chgsys" -> "ARG/ENV list size"
but be aware that every new process will consume the additional memory
you specify.
Joachim |