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 ) id 1Qiai7-0003UQ-Sy for garchives@archives.gentoo.org; Sun, 17 Jul 2011 23:25:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A30521C08C; Sun, 17 Jul 2011 23:25:10 +0000 (UTC) Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com [209.85.215.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 6EC5021C346 for ; Sun, 17 Jul 2011 23:23:55 +0000 (UTC) Received: by ewy8 with SMTP id 8so1479845ewy.40 for ; Sun, 17 Jul 2011 16:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=bksqWL1t3utkb5aYD5+v88fXHpJiIa7f4B8nVFS+MoU=; b=fjT8kxjSV/3xhTj9U6gvn3JU50IrY7JBWm9VlIdl10epIAOnd+nW6ihmNLj6uTjD0T gSeW8Ao4nfKraeZFW2rgNamMOj8fF85lCTPRlBeSGlbKs4548rNMugqR5d68uJZ6mlxn hkHPymPaBzuwMXtJc4ojLLpJe9TH9Ff7unT0M= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.14.20.75 with SMTP id o51mr2007105eeo.145.1310945034485; Sun, 17 Jul 2011 16:23:54 -0700 (PDT) Received: by 10.14.50.203 with HTTP; Sun, 17 Jul 2011 16:23:54 -0700 (PDT) In-Reply-To: <20110717205303.6263aa02@karnak.local> References: <20110717205303.6263aa02@karnak.local> Date: Sun, 17 Jul 2011 16:23:54 -0700 Message-ID: Subject: Re: [gentoo-user] Any way around "Argument list too long"? From: Grant To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 2d22b0e1a9ebeaddbf09a9660b2bc54c > way around "Argument list too long"?: > >> My crontab deletes all files of a certain type in a certain folder >> with yesterday's date in the filename. =A0It usually executes but >> sometimes fails with: >> >> /bin/rm: Argument list too long >> >> What would you do about this? > > Use find with the -delete option. I'm getting the same thing from find: $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg /usr/bin/find: Argument list too long $ /usr/bin/find -delete /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*= .jpg /usr/bin/find: Argument list too long $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg|xar= gs rm /usr/bin/find: Argument list too long rm: missing operand Try `rm --help' for more information. - Grant