Not long ago, Derek Carter proclaimed... > Eric Jensen wrote: > > ><snip> > >Quick question, what is the difference of doing something like: > > > >`find stuff | rm -rf ` and `find stuff | xargs rm -rf `? > > find stuff | rm -rf -- this command will generate a list of all 'found' > files and send that to STDIN of the rm command, the rm command will > erase all file paths sent to it from STDIN. > > find stuff | xargs rm -rf -- this command will generate a list of all > 'found files and send that list to the xargs command which takes that > list and runs the command > supplied with each member of the list (eg rm -rf stuff1, rm -rf stuff2) > > so the biggest difference is the number of rm processes you're creating, > one for the first command that deletes all the files, and one for each > 'found' file with the second.
So what about 'find stuff -exec rm {} \;'?
-=Fozz
--
[EMAIL PROTECTED] is Doran L. Barton, president, Iodynamics LLC
Iodynamics: Linux solutions - Web development - Business connectivity
"Instructions: Open packet, eat nuts."
-- Seen on an in-flight packet of nuts
pgpgXUl9F1LVq.pgp
Description: PGP signature
.===================================. | This has been a P.L.U.G. mailing. | | Don't Fear the Penguin. | | IRC: #utah at irc.freenode.net | `==================================='
