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-125695-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1QiXTV-0007AJ-LS
	for garchives@archives.gentoo.org; Sun, 17 Jul 2011 19:58:01 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0679821C201;
	Sun, 17 Jul 2011 19:57:42 +0000 (UTC)
Received: from mail-pv0-f181.google.com (mail-pv0-f181.google.com [74.125.83.181])
	by pigeon.gentoo.org (Postfix) with ESMTP id 8E4CA21C1EF
	for <gentoo-user@lists.gentoo.org>; Sun, 17 Jul 2011 19:55:29 +0000 (UTC)
Received: by pvg13 with SMTP id 13so4246766pvg.40
        for <gentoo-user@lists.gentoo.org>; Sun, 17 Jul 2011 12:55:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=sender:from:reply-to:to:subject:date:message-id:x-mailer
         :mime-version:content-language:content-type
         :content-transfer-encoding;
        bh=U+z+gaTjZkEV+rIe1lFPf/TgMNOlzYBiLUJpEUlv4yw=;
        b=Sh71AaRcBl8zuIwf4R4QVhpVBjBFuummuoYEVauypgMLjBZaslttgQoSizKOfBEPVc
         vpFvagNzOy6DKE4Q4rdMMUfj+QT8T5ndyyOiL7vCEjoFLxJ2OLk/duNCUyYzUITn4nRm
         0+3ecr/KK89ToRMNZ0r+ryEq/6hNWE2KdyVMg=
Received: by 10.68.16.37 with SMTP id c5mr6421304pbd.42.1310932528854;
        Sun, 17 Jul 2011 12:55:28 -0700 (PDT)
Received: from [10.16.166.133] ([223.255.230.4])
        by mx.google.com with ESMTPS id v9sm2076220pbm.31.2011.07.17.12.55.23
        (version=SSLv3 cipher=OTHER);
        Sun, 17 Jul 2011 12:55:27 -0700 (PDT)
Sender: Pandu Poluan <pepoluan@gmail.com>
From: Pandu Poluan <pandu@poluan.info>
To: gentoo-user@lists.gentoo.org
Subject: RE: [gentoo-user] Any way around "Argument list too long"?
Date: Mon, 18 Jul 2011 02:54:49 +0700
Message-ID: <3CvJ3DzDP2Vn.Bh2zCSVd@smtp.gmail.com>
X-Mailer: EPOC Email Version 2.10
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-Language: i-default
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: c65318af3303c1bc697d97d110c9dffe

-original message-
Subject: Re: [gentoo-user] Any way around "Argument list too =
long"?
From: Alan Mackenzie <acm@muc.de>
Date: 2011-07-18 02:42

>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.

You'll want to be extra careful with special characters like (space), =
single quote, and double quote.

Better use find ..... -exec rm {} +

See: =
http://en.m.wikipedia.org/wiki/Xargs


Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~

Sent from Nokia E72-1