3 ms·
In the times past the command line was pushed onto the user stack of the new process, this was before the process was of course started. This means you were lim
by tankenmate 9y ago
In the times past the command line was pushed onto the user stack of the new process, this was before the process was of course started. This means you were limited to the default available stack plus or minus whatever else needed to be pushed onto the stack for a starting process. In older kernels sbrk() (to grow the user stack of a process) could only be called on a process that already exists, not one that is being crated. This means your argument list could indeed be too long.
- amelius 9y agoI vaguely was aware of this, but whatever the reason, it's ridiculous that in this day and age of gigabytes of memory, I still can't use shell wildcards in directories with a decently large number of files.
- tankenmate 9y agoThe limit on Linux is usually a bit under 2MB (ARG_MAX), other Unicies will vary no doubt and Windows is 32KB, and I'm sure you are aware that xargs is your friend.
- vram22 9y agoYes, xargs works on Unixen. I wonder if there is any equivalent on Windows (other than using Unix xargs via Cygwin etc.), or writing your own? This point didn't occur to me before, but it could be useful.