Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!apple!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.shell Subject: Re: Can U pipe filenames to rm??? Message-ID: <2999@wyse.wyse.com> Date: 6 Oct 90 00:22:35 GMT References: <28790001@col.hp.com> <1977@sixhub.UUCP> <1990Sep30.182331.14363@iconsys.uucp> <941@hls0.hls.oz> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 22 In article <941@hls0.hls.oz> george@hls0.hls.oz (George Turczynski) writes: >From previous postings- > >> >Example: >> > find {{stuff here}} -print | xargs rm -f ...deleted examples and discourse >Why use `xargs' when you don't need to ? Because the -exec for find will run the rm on a file by file basis. If you find many matches to the pattern you have the overhead and system load generated by an exec of rm for each file found. Using xargs can reduce the number of execs quite a bit and so would be useful where you expect lots of files found or on a system with heavy 24 hour usage. In other cases, you would certainly not need it, as you note. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com