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

fred smith fredex at fcshome.stoneham.ma.us
Fri Oct 24 15:48:16 UTC 2008

On Fri, Oct 24, 2008 at 06:49:02AM -0500, Johnny Hughes wrote:
> Jussi Hirvi wrote:
> >> piping ls to xargs should do the trick. man xargs for details.
> > 
> > Ok, thanks for ideas, Laurent and Lawrence.
> > 
> > A strange limitation in ls and rm, though. My friend said he hasn't seen
> > that in Fedora. 
> This issue is in Fedora, Ubuntu, CentOS, RHEL, (put any other linux
> version you want here).
> When you get too many files in a directory, you will receive this error.
>  The same SOURCE code is compiled regardless of the "Distro".
> As you have seen. there are many solutions to this problem ... HOWEVER,
> picking a new distro is not one of them
> Most people never hit this limitation, but it is certainly possible and
> there in all versions of Linux.
> Thanks,
> Johnny Hughes

I've always understood it to be an issue with commandline length: somewhere
(probably in bash) there's a limit on how big a buffer is/can be used for
storing the comamndline.

---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
                       I can do all things through Christ 
                              who strengthens me.
------------------------------ Philippians 4:13 -------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20081024/de4d4ef1/attachment.bin

More information about the CentOS mailing list