Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!apple!olivea!orc!inews!cmdnfs!bhoughto From: bhoughto@cmdnfs.intel.com (Blair P. Houghton) Newsgroups: comp.unix.shell Subject: Re: Beware xargs security holes Summary: I flame myself Message-ID: <653@inews.intel.com> Date: 27 Oct 90 16:57:35 GMT References: <1990Oct24.0100 <649@inews.intel.com> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 18 In article <649@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >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 -- Lose the -v, dimwit. > "Took longer to type." --Blair "Egotistical, overreaching, pretentious, typographically unsound geek!"