From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 17 21:47:45 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6BB216A400 for ; Sat, 17 Mar 2007 21:47:45 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.freebsd.org (Postfix) with ESMTP id 8517B13C4BE for ; Sat, 17 Mar 2007 21:47:45 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2HLlj7s015180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 17 Mar 2007 14:47:45 -0700 X-Auth-Received: from [192.168.10.41] (c-67-187-172-183.hsd1.ca.comcast.net [67.187.172.183]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l2HLlhgM005678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 17 Mar 2007 14:47:44 -0700 Message-ID: <45FC61FF.3090009@u.washington.edu> Date: Sat, 17 Mar 2007 14:47:43 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.10 (X11/20070316) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.3.17.143934 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Possible grep(1) bug or user error :)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2007 21:47:45 -0000 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