public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Any way around "Argument list too long"?
Date: Sun, 17 Jul 2011 19:42:30 +0000	[thread overview]
Message-ID: <20110717194230.GC3232@acm.acm> (raw)
In-Reply-To: <CAN0CFw2H0KVHbHtL-dzNtgi3KraB7vO+RqhYmc08w_Jv4tFWqg@mail.gmail.com>

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



  reply	other threads:[~2011-07-17 19:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 19:32 [gentoo-user] Any way around "Argument list too long"? Grant
2011-07-17 19:42 ` Alan Mackenzie [this message]
2011-07-17 19:52 ` victor romanchuk
2011-07-17 19:53 ` David W Noon
2011-07-17 23:23   ` Grant
2011-07-17 23:36     ` Michael Mol
2011-07-17 23:37     ` Alan McKinnon
2011-07-18  0:47       ` Grant
2011-07-18  1:05         ` Albert Hopkins
2011-07-18  1:40           ` Grant
2011-07-18  8:48             ` Neil Bothwick
2011-07-18 21:56               ` Grant
2011-07-19 13:58               ` Florian Philipp
2011-07-19 14:24                 ` Neil Bothwick
2011-07-19 18:24                 ` Grant
2011-07-19 19:28                   ` David W Noon
2011-07-20  8:54                 ` Joost Roeleveld
2011-07-17 21:14 ` Alan McKinnon
2011-07-17 22:06   ` [gentoo-user] " walt
2011-07-17 22:31     ` Mick
2011-07-17 22:35     ` Alan McKinnon
2011-07-17 23:16       ` Neil Bothwick
2011-07-17 23:43         ` Alan McKinnon
  -- strict thread matches above, loose matches on Subject: below --
2011-07-17 19:54 [gentoo-user] " Pandu Poluan
2011-07-17 21:51 ` Michael Mol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110717194230.GC3232@acm.acm \
    --to=acm@muc.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox