exactly. find . -type f | xargs rm -f is faster than the 'exec' equivalent.

In case your files have weird quotable characters, e.g. ` ' etc in them (or
spaces) use:
    find . -type f -print0 | xargs -0 rm -f

On 28/01/2008, Noah K Sematimba <[EMAIL PROTECTED]> wrote:
>
>
> Actually not. I actually use xargs and I am not sure there is a difference
> between the two commands. AFAIK xargs actually also runs rm for every
> single
> file as the output gets piped to it.
>
> Noah.
> On Monday 28 January 2008 17:09, andrew colin wrote:
> > xargs takes back to the problem of mv only supporting a certain number
> > of arguments.
> >
> > On 1/28/08, Hari Kurup <[EMAIL PROTECTED]> wrote:
> > > Patrick Okui wrote:
> > > > The last time I tried something similar (4 years ago) it works
> pretty
> > > > well with one limitation. Bash (and other shells) won't take more
> than
> > > > 256 (i think) arguments so you'd have to find . -type f -exec rm
> '{}'
> > > > ';' or similar.
> > > >
> > > > That would work but I'm not sure how long it would actually take.
> > >
> > > I think piping it through xargs would be faster? This one calls 'rm'
> for
> > > every single file.
> > >
> > > --
> > > Hari
> > > _______________________________________________
> > > LUG mailing list
> > > [email protected]
> > > http://kym.net/mailman/listinfo/lug
> > > %LUG is generously hosted by INFOCOM http://www.infocom.co.ug/
> > >
> > > The above comments and data are owned by whoever posted them
> (including
> > > attachments if any). The List's Host is not responsible for them in
> any
> > > way. ---------------------------------------
> _______________________________________________
> LUG mailing list
> [email protected]
> http://kym.net/mailman/listinfo/lug
> %LUG is generously hosted by INFOCOM http://www.infocom.co.ug/
>
> The above comments and data are owned by whoever posted them (including
> attachments if any). The List's Host is not responsible for them in any way.
> ---------------------------------------
>
>


-- 
"Happiness makes up in height what it lacks in length"
-- Robert Frost
_______________________________________________
LUG mailing list
[email protected]
http://kym.net/mailman/listinfo/lug
%LUG is generously hosted by INFOCOM http://www.infocom.co.ug/

The above comments and data are owned by whoever posted them (including 
attachments if any). The List's Host is not responsible for them in any way.
---------------------------------------

Reply via email to