Can U pipe filenames to rm???

George Turczynski george at hls0.hls.oz
Thu Oct 4 08:33:07 AEST 1990


>From previous postings-

> >Example:
> >  find {{stuff here}} -print | xargs rm -f
  
> Locally, we've hacked our "find" to handle:
> 	$ find . -name \*.old -rm

Our `find' (SunOS) supports the `-exec' option, and I assume this would be
fairly common.  So, those of you without xargs, and who | a. can't,  b. don't
want to | hack `find' use it like this:

	find {{stuff here}} -exec rm -f {} \;

Why use `xargs' when you don't need to ?

-- 
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