From owner-freebsd-questions@FreeBSD.ORG Mon Mar 4 13:41:35 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DD888FF1 for ; Mon, 4 Mar 2013 13:41:35 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 83C0A18B2 for ; Mon, 4 Mar 2013 13:41:34 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.6/8.14.6) with ESMTP id r24DfUC3066600; Mon, 4 Mar 2013 06:41:30 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.6/8.14.6/Submit) with ESMTP id r24DfUis066597; Mon, 4 Mar 2013 06:41:30 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 4 Mar 2013 06:41:30 -0700 (MST) From: Warren Block To: Polytropon Subject: Re: Grepping though a disk In-Reply-To: <20130304121524.63685108.freebsd@edvax.de> Message-ID: References: <20130304013608.7981e8a9.freebsd@edvax.de> <51347454.5060605@gmail.com> <20130304121524.63685108.freebsd@edvax.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 04 Mar 2013 06:41:30 -0700 (MST) Cc: Joshua Isom , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2013 13:41:35 -0000 On Mon, 4 Mar 2013, Polytropon wrote: > The file size of the file I'm searching for is less than 10 kB. > It's a relatively small text file which got some subsequent > additions in the last days, but hasn't been part of the backup > job yet. There have been some good suggestions. I would use a large buffer with dd, say 1M or more, both for speed and to reduce the chance of hitting only part of the search string. For the future, look at sysutils/rsnapshot. Easy to set up, space-efficient, and provides an easily-accessed file history.