View Single Post

   
  #3 (permalink)  
Old 04-24-2008, 04:37 PM
Hajo Ehlers
 
Posts: n/a
Default Re: Parameter list is too long

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

Reply With Quote