<quote who="Amos Shapira"> >> Zhasper> find . -name "<junkfile>" -print0 | xargs -0 rm >> >> Actually lighter weight, less forking less execing, because this version >> runs two procsses only, rather than a new invocation of rm for each file >> found. > > It runs at least three processes if it finds any file - "rm" is forked > from xargs (unless xargs is smart enough to save the fork on end of > input?)
No, three in total (in common circumstances): One for find, one for xargs, one for rm. It will invoke more than one rm process if xargs determins that the parameter length is too long for a single invocation (or if other params altering that behaviour are passed to it, unlike the example provided). - Jeff -- OSCON 2007: Portland OR, USA http://conferences.oreillynet.com/oscon/ "jwz? no way man, he's my idle" - James Wilkinson -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
