Beware xargs security holes

Blair P. Houghton bhoughto at cmdnfs.intel.com
Sun Oct 28 03:57:35 AEST 1990


In article <649 at inews.intel.com> bhoughto at cmdnfs.intel.com (Blair P. Houghton) writes:
>In article <john.656921455 at troch> john at 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!"



More information about the Comp.unix.shell mailing list