From owner-freebsd-questions@FreeBSD.ORG Wed Feb 16 11:38:04 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67EC71065672 for ; Wed, 16 Feb 2011 11:38:04 +0000 (UTC) (envelope-from andreev.peter@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 201F38FC1D for ; Wed, 16 Feb 2011 11:38:03 +0000 (UTC) Received: by ywl2 with SMTP id 2so567028ywl.13 for ; Wed, 16 Feb 2011 03:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=Jpw0HMzUCIGB9q3P73SB9JDaOiFXyAdio8YO+K5A4/Q=; b=x29XfDGeuMt46mVCty5EZE6pRrIYRraSTI6j/fyKK6qkTs8IUSboEJpSp+xGQkJHi0 yEahJhchbmjHoco56tzRBUdbwTWBL5KgwletNiZljWLtle8famRDpvDFs1psrwCEvcch QCl9EbnELAq+venbNvas8aN6S/XoIOrJvqByI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Es+hW7JS74I7aRtejzONeGpXXRWYnP0YHIDRcma7jUwD+KKUSFOFDLDBEPbe+VTw4V im+ROYwelY18N3EAOIeg6xZqSVujCtfcyE4qPu4/+n19RBx4eKZ81/1EQi5jeY0RJ0FA rFcedMctbNNzMwyFZtmrblbZi8EZnHmbQN5Ug= MIME-Version: 1.0 Received: by 10.90.25.11 with SMTP id 11mr624464agy.119.1297856281719; Wed, 16 Feb 2011 03:38:01 -0800 (PST) Received: by 10.90.100.15 with HTTP; Wed, 16 Feb 2011 03:38:01 -0800 (PST) In-Reply-To: <20110215145335.5f666400@gumby.homeunix.com> References: <3.0.1.32.20110214163437.019167e0@sage-american.com> <12e28896cd5.6574638108640039636.4001582758217268039@zoho.com> <20110215145335.5f666400@gumby.homeunix.com> Date: Wed, 16 Feb 2011 14:38:01 +0300 Message-ID: From: Peter Andreev To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 11:38:04 -0000 2011/2/15 RW : > On Tue, 15 Feb 2011 12:57:12 +0300 > Peter Andreev wrote: > >> Use of "xargs" on many files will be much faster than "find...exec" >> construction > > This is a surprisingly common myth. exec can pass single or multiple > arguments =A0according to whether you use ";" or "+" You are right, use of "+" makes "-exec" much faster. Thank you, I didn't know about this feature. >> >> find / -type f -name copyright.htm | xargs sed -i .bak -e >> 's/2010/2011/g' > > This is much less safe on FreeBSD than it is with the GNU versions > because print0 is required for paths with spaces. > > find =A0... -print0 | xargs -0 ... > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > --=20 -- AP