From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-125692-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QiXHn-0005Wf-BA
	for garchives@archives.gentoo.org; Sun, 17 Jul 2011 19:45:56 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 482AEE0552;
	Sun, 17 Jul 2011 19:45:46 +0000 (UTC)
Received: from mail.muc.de (colin.muc.de [193.149.48.1])
	by pigeon.gentoo.org (Postfix) with ESMTP id 05D00E0441
	for <gentoo-user@lists.gentoo.org>; Sun, 17 Jul 2011 19:44:49 +0000 (UTC)
Received: (qmail 74144 invoked by uid 3782); 17 Jul 2011 19:44:48 -0000
Received: from acm.muc.de (pD9557655.dip.t-dialin.net [217.85.118.85]) by
	colin2.muc.de (tmda-ofmipd) with ESMTP;
	Sun, 17 Jul 2011 21:44:47 +0200
Received: (qmail 19061 invoked by uid 1000); 17 Jul 2011 19:42:30 -0000
Date: Sun, 17 Jul 2011 19:42:30 +0000
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Any way around "Argument list too long"?
Message-ID: <20110717194230.GC3232@acm.acm>
References: <CAN0CFw2H0KVHbHtL-dzNtgi3KraB7vO+RqhYmc08w_Jv4tFWqg@mail.gmail.com>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAN0CFw2H0KVHbHtL-dzNtgi3KraB7vO+RqhYmc08w_Jv4tFWqg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Delivery-Agent: TMDA/1.1.5 (Fettercairn)
From: Alan Mackenzie <acm@muc.de>
X-Primary-Address: acm@muc.de
X-Archives-Salt: 
X-Archives-Hash: 52ede701cbd13e889986c96c8db3eca8

Hi, Grant.

On Sun, Jul 17, 2011 at 12:32:42PM -0700, Grant wrote:
> My crontab deletes all files of a certain type in a certain folder
> with yesterday's date in the filename.  It usually executes but
> sometimes fails with:

> /bin/rm: Argument list too long

> What would you do about this?

Use xargs - in place of
    /bin/rm lots of files ......

Use
   Lots_of_file_names | xargs rm

.  xargs then calls rm several times with batches of filenames each time.
xargs is a standard Unix command.

> - Grant

-- 
Alan Mackenzie (Nuremberg, Germany).