Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!iconsys!mday From: mday@iconsys.uucp (Matt Day) Newsgroups: comp.unix.shell Subject: Re: Can U pipe filenames to rm??? Message-ID: <1990Sep30.182331.14363@iconsys.uucp> Date: 30 Sep 90 18:23:31 GMT References: <28790001@col.hp.com> <1977@sixhub.UUCP> Organization: Sanyo/Icon International, Inc., Orem, Utah Lines: 18 In article <1977@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes: >In article <28790001@col.hp.com> greiner@col.hp.com (Mike Greiner) writes: >> Now I want to pipe the output of this command into rm. Here's the output: > > I think what you want is the xargs routine, which may not be available >on your system but is on most. > >Example: > find {{stuff here}} -print | xargs rm -f Locally, we've hacked our "find" to handle: $ find . -name \*.old -rm And "find" will do the unlink() itself. It also has similar "-chown" and "-chgrp". It's much faster than running "rm" a zillion times.. -- - Matthew T. Day, Sanyo/Icon, mday@iconsys.icon.com || uunet!iconsys!mday