Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2007 14:47:43 -0700
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-hackers@freebsd.org
Subject:   Possible grep(1) bug or user error :)?
Message-ID:  <45FC61FF.3090009@u.washington.edu>

next in thread | raw e-mail | index | archive | help
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).

Thankfully it wasn't one of my primary devices, so deleting it wasn't an 
issue. However I was wondering if this case should be considered (in 
error checking) and another option should be added to output grep info 
to a file, instead of /dev/stdout, which would affect the behavior of 
the --exclude flag (i.e. the output file would automatically be added to 
--exclude's relevant array of non-searched arguments).

Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45FC61FF.3090009>