[CentOS] The directory that I am trying to clean up is huge

Robert P. J. Day rpjday at crashcourse.ca
Sat Jan 23 12:45:05 UTC 2010


On Sat, 23 Jan 2010, Marcelo M. Garcia wrote:

> Robert Heller wrote:
> >>
> >> -bash: /usr/bin/find: Argument list too long
> >
> > 'man xargs'
> >
> > find <mumble> -print | xargs rm
> >
> Hi
>
> Just curious. What is the difference between the command above and "find
> <numble> -exec rm -f {} \;" ?

  the find ... -exec variation will invoke a new "rm" command for
every single file it finds, which will simply take more time to run.
beyond that, the effect should be the same.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


More information about the CentOS mailing list