Path: utzoo!attcan!uunet!samsung!usc!sdd.hp.com!decwrl!orc!inews!cmdnfs!bhoughto From: bhoughto@cmdnfs.intel.com (Blair P. Houghton) Newsgroups: comp.unix.shell Subject: Re: Beware xargs security holes Message-ID: <649@inews.intel.com> Date: 27 Oct 90 05:49:52 GMT References: <1890@necisa.ho.necisa.oz> <1990Oct24.0100 Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 11 In article john@sco.COM (John R. MacMillan) writes: > >find / -name '#*' -print | xargs patok '.*/#[^/]*' rm -f -- > >where patok elimnates arguments that don't match the pattern. >[patok] shouldn't be too hard to write. find / -name '#*' -print | egrep -v '.*/#[^/]*' | xargs rm -f -- --Blair "Took longer to type."