rm argument list too long find and xargs

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Tue Apr 13 00:58:20 UTC 2010


On Mon, Apr 12, 2010 at 02:03:38PM -0400, Chris F.A. Johnson wrote:
> On Mon, 12 Apr 2010, Christopher Browne wrote:
> 
> > On Mon, Apr 12, 2010 at 12:29 PM, teddymills <teddy-5sHjOODPK7E at public.gmane.org> wrote:
> > >
> > > I was trying to rm more than 1024 files at one time (old logs)
> > > and rm returned a strange error. "Argument list too long"
> > >
> > > so find and xargs to the rescue..
> > > find . -name 'myDEBUG*.log' | xargs rm
> > >
> > > http://en.wikipedia.org/wiki/Xargs
> > > uname -a shows a kernel less than 2.6.23
> > 
> > This isn't normally a kernel issue - it is normally an issue of how
> > your shell handles "globbing" / argument expansion.
> 
>    No, it is a kernel issue.

Hmm.. I thought this is libc issue.  Who gives "argc" and "argv" to a
program?  Is it the kernel?

-- 
William

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list