From owner-freebsd-questions@FreeBSD.ORG Thu Dec 9 17:55:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D89AE16A4CE for ; Thu, 9 Dec 2004 17:55:49 +0000 (GMT) Received: from out012.verizon.net (out012pub.verizon.net [206.46.170.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4D5E43D39 for ; Thu, 9 Dec 2004 17:55:47 +0000 (GMT) (envelope-from ringworm@inbox.lv) Received: from ringworm.mechee.com ([4.26.84.7]) by out012.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20041209175545.POSB25255.out012.verizon.net@ringworm.mechee.com> for ; Thu, 9 Dec 2004 11:55:45 -0600 Received: by ringworm.mechee.com (Postfix, from userid 1001) id 476222CE740; Thu, 9 Dec 2004 09:53:19 -0800 (PST) From: "Michael C. Shultz" To: freebsd-questions@freebsd.org User-Agent: KMail/1.7.1 References: <019101c4de0e$dbdeb2d0$0200000a@SAGEAME> In-Reply-To: <019101c4de0e$dbdeb2d0$0200000a@SAGEAME> MIME-Version: 1.0 Content-Disposition: inline Date: Thu, 9 Dec 2004 09:53:18 -0800 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <200412090953.18537.ringworm@inbox.lv> X-Authentication-Info: Submitted using SMTP AUTH at out012.verizon.net from [4.26.84.7] at Thu, 9 Dec 2004 11:55:44 -0600 Subject: Re: Find & Replace string X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 17:55:50 -0000 On Thursday 09 December 2004 08:48 am, antenneX wrote: > Help on commands/script needed. > > In a website of 1.GB+ with several hundred thousand files, I need to > interrogate all files to replace a single string like "oldone.010" > with "newone.011" > > What's the best way to do this? > > Thanks in advance! > > Best regards, > > Jack L. Stone > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" try: sed -i '' s/oldone.010/newone.011/g filename* -Mike (I got this from the dru hints on my login screen...)