Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!wolfen!hls0!george From: george@hls0.hls.oz (George Turczynski) Newsgroups: comp.unix.shell Subject: Re: Can U pipe filenames to rm??? Message-ID: <943@hls0.hls.oz> Date: 8 Oct 90 23:27:26 GMT References: <28790001@col.hp.com> <1977@sixhub.UUCP> <1990Oct5.163050.8835@ibmpcug.co.uk> Lines: 46 I wrote... > >Why use `xargs' when you don't need to ? Finally, someone replies... In article <1990Oct5.163050.8835@ibmpcug.co.uk>, dylan@ibmpcug.co.uk (Matthew Farwell) writes: > 2 points. > 1) The original posting wasn't about find, it was about another pipe which > produced filenames on stdout, so comments on xargs were required. > > 2) find / -exec rm -f {} \; spawns rm everytime it encounters a file > so its very slow and expensive, whereas xargs collects all the filenames > together, bundles them up into lines which won't exceed the system limit > and then spawns one job for all of those. Its much more environmentally > friendly. 1) That is correct. To many articles are posted as advice that seem to require blind faith to use them. For those of you who haven't caught on, the question was rhetorical, looking for someone to respond. I say the answer to it should have been in the posting that contained it. It's only a small gripe, but I'd just like to see people who answer (any) questions on the net answer thoroughly, ie with alternatives and pro's/con's of each. People who can't answer like this probably shouldn't be answering. After all, a genius is not someone who can simply solve a problem, but someone who can solve in numerable ways. I'd like to see users of the net using methods we give them with reason, not blind faith. 2) This is also true, yet wasn't hinted at in the first article containing it, where it perhaps should have been. What is more environmentally friendly is bandwidth not being wasted by people reverberating questions like `why use xargs ?' all over the net, because someone posted answers requiring questions :-) Oh well, enough said, back to work... -- George P. J. Turczynski, Computer Systems Engineer. Highland Logic Pty Ltd. ACSnet: george@highland.oz |^^^^^^^^^^^^^^^^^^^^^^^^| Suite 1, 348-354 Argyle St Phone: +61 48 683490 | Witty remarks are as | Moss Vale, NSW. 2577 Fax: +61 48 683474 | hard to come by as is | Australia. --------------------------- space to put them ! ---------------------------