From owner-freebsd-current@FreeBSD.ORG Sat Feb 14 05:48:33 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4AE616A4CE for ; Sat, 14 Feb 2004 05:48:33 -0800 (PST) Received: from pd4mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D871643D1F for ; Sat, 14 Feb 2004 05:48:33 -0800 (PST) (envelope-from sdyoung@vt220.org) Received: from pd3mr2so.prod.shaw.ca (pd3mr2so-ser.prod.shaw.ca [10.0.141.178])2003))freebsd-current@freebsd.org; Sat, 14 Feb 2004 06:48:33 -0700 (MST) Received: from pn2ml4so.prod.shaw.ca (pn2ml4so-qfe0.prod.shaw.ca [10.0.121.148]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HT200INBUCXRV@l-daemon> for freebsd-current@freebsd.org; Sat, 14 Feb 2004 06:48:33 -0700 (MST) Received: from [10.0.0.2] (h68-144-59-39.cg.shawcable.net [68.144.59.39]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HT200EAPUCXV9@l-daemon> for freebsd-current@freebsd.org; Sat, 14 Feb 2004 06:48:33 -0700 (MST) Date: Sat, 14 Feb 2004 06:48:32 -0700 From: Steve Young In-reply-to: <20040214034523.B254E43D1F@mx1.FreeBSD.org> To: freebsd-current@freebsd.org Message-id: <7A65C36B-5EF4-11D8-9690-0003939C3B2E@vt220.org> MIME-version: 1.0 X-Mailer: Apple Mail (2.612) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT References: <200402090704.i1974IVa032065@the-macgregors.org> <20040214034523.B254E43D1F@mx1.FreeBSD.org> Subject: Re: grep bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2004 13:48:34 -0000 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.