Re: grep bug

From: Steve Young <sdyoung_at_vt220.org>
Date: Sat, 14 Feb 2004 06:48:32 -0700
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.
Received on Sat Feb 14 2004 - 04:48:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:43 UTC