Garret,

Sat, Mar 17, 2007 at 02:47:43PM -0700, Garrett Cooper wrote:
> I was recently grepping a directory and outputting to a file located in the 
> same directory as follows:
> 
> grep -ri {key} * > {key}.found
> 
> The thing is that grep kept on feeding off of the {key}.found file and 
> eventually ate up all the free space on the device (~12GB).

And what you expected? The file {key}.found was created prior to the
expansion of '*', so grep was parsing that file and feeding it with
the messages about the lines with {key} that were found. And these
lines also provoked grep to add more lines about the {key} found, and
so on. I think you got the idea of the infinite cycle you created.
-- 
Eygene
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to