Can U pipe filenames to rm???

George Turczynski george at hls0.hls.oz
Tue Oct 9 09:27:26 AEST 1990


I wrote...
> >Why use `xargs' when you don't need to ?

Finally, someone replies...

In article <1990Oct5.163050.8835 at ibmpcug.co.uk>, dylan at 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 at 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 !    ---------------------------



More information about the Comp.unix.shell mailing list