Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"0403-027 The parameter list is too long" when running command "l 1

Status
Not open for further replies.

yuroy

Technical User
Aug 26, 2001
18
SG
Hi All,
I'm getting this error when running the command "ls *" or "rm *":
"ksh: /usr/bin/ls: 0403-027 The parameter list is too long."

Has anyone encountered this before?

thanks in advance for the help.
 
Yip, you have more than 2048 files (I think that's the amount) in the directory. IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
hi,
yes, there are more than 2048 files in the directory. But we never encountered this error with Solaris or HP-UX.

Is there a solution for this in AIX? We're on AIX4.3.3.

many thanks.
 
Yes - in AIX 5.1 (-: you can specify up to 128x4K for ARG/ENV list

Workaround is - splitting your jobs or parsing filename arguments from find ie

find . -name databackup | cpio -???
or
| xargs echo

or something like that
 
You will have to get creative to get around this one. Happens to me occasionally. I try to do something besides "ls *", such as just "ls". The shell expands the asterisk into a list, so you can probably get by that in a ls just by omitting the *. When you do a "ls" I think it just streams the dir listing to STDOUT, but I could be wrong.
 
Another solution is to use the find command to send the list of files to ls. Use this:
Code:
find . -ls
This way you can also control the RE of which files to display. Using the -name attribute:
Code:
find . -name "*.log" -ls
There are a ton more attributes by which you can filter using find. It is worth it to know this command. Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
At one of the maint levels, IBM changed awk to accept 999 args instead of just 99, after much complaining on our part.
 
thanks all for the suggestions.
hope IBM will release a patch for this rather than users having to work around this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top