Can U pipe filenames to rm???

Matt Day mday at iconsys.uucp
Mon Oct 1 04:23:31 AEST 1990


In article <1977 at sixhub.UUCP> davidsen at sixhub.UUCP (bill davidsen) writes:
>In article <28790001 at col.hp.com> greiner at 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 at iconsys.icon.com || uunet!iconsys!mday



More information about the Comp.unix.shell mailing list