[CentOS] ls and rm: "argument list too long"

Sun Oct 19 02:08:46 UTC 2008
Damian S <dsteward at internode.on.net>

> and get only "argument list too long" as feedback.
> 
> Is there a way to go round this problem?
> 
> I have CentOS 5.2. 
> 
I'm not going to repeat some of the good advice given to you by others
as to how to avoid this error, but will instead tell you this is related
to the ARG_MAX variable.
The standard limit for linux kernels up to 2.6.22.xxxx is 131072 chars.
This can be confirmed by typing:
getconf ARG_MAX
Until CentOS uses the 2.6.23 kernel (or later) in which the length of
arguments is constrained only by system resources, you'll need to use
scripting techniques which are more parsimonious.