Date: Sat, 14 Feb 2004 06:48:32 -0700 From: Steve Young <sdyoung@vt220.org> To: freebsd-current@freebsd.org Subject: Re: grep bug Message-ID: <7A65C36B-5EF4-11D8-9690-0003939C3B2E@vt220.org> In-Reply-To: <20040214034523.B254E43D1F@mx1.FreeBSD.org> References: <200402090704.i1974IVa032065@the-macgregors.org> <AC98D3D2-5E98-11D8-A086-0003939C3B2E@vt220.org> <20040214034523.B254E43D1F@mx1.FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7A65C36B-5EF4-11D8-9690-0003939C3B2E>