grep bug

Steve Young sdyoung at vt220.org
Sat Feb 14 05:48:34 PST 2004


On Feb 13, 2004, at 8:45 PM, Robin Schoonover wrote:

> grep has to pull in the entire line, and /dev/zero is a line with no
> end, so it tries pulling it all into memory until there is no more 
> memory
> for a line to go into.  (This part has been mentioned on this list 
> before.)

   It seems FreeBSD ships with grep 2.4d.  In newer versions it looks 
like there
is a -D argument you can use to tell it how to handle devices - -Dskip 
will skip
them and avoid this problem when doing grep -r /.

   find / -type f | xargs grep foo works too.

   Steve.



More information about the freebsd-current mailing list