Piyush Shivam wrote:
I am getting the following error
sh: /usr/bin/ls: arg list too long

This happens in my perl code when I do @files = `ls $a/$b*`. Depending on the 
value of $a and $b I get this error message; in particular when the values of 
$a and $b are very long. The number of files is fixed = 40, but each file has a 
very long name ($a/$b* is very long).

I tried this on build 42a for sparc as well as x86 with the same results. Is 
there a fix for this?

Thanks,
Piyush
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

There's an upper limit for argument list lengths in the kernel.
I had no problem passing 2M, but Solaris doesn't like 20M....

Given that MAXPATHLEN is 1024, 40*1024*2 + 40 is far
less than the internal limits.

Are you sure there are only 40 files?

- Bart




--
Bart Smaalders                  Solaris Kernel Performance
[EMAIL PROTECTED]               http://blogs.sun.com/barts
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to