Date: Wed, 16 Feb 2011 14:38:01 +0300 From: Peter Andreev <andreev.peter@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: script help Message-ID: <AANLkTik4xrt%2Bg3CaoBNsgj8jepbrCrU1Wp-x_m1DBKpJ@mail.gmail.com> In-Reply-To: <20110215145335.5f666400@gumby.homeunix.com> References: <3.0.1.32.20110214163437.019167e0@sage-american.com> <AANLkTinJn7=BMwCvRyEUoNQz-fR4%2BacHmiQovfuZ%2B69G@mail.gmail.com> <12e28896cd5.6574638108640039636.4001582758217268039@zoho.com> <AANLkTi=3ngyVR38-tCjcMKxOpNNSN6Qo2uiJE7y4qpDD@mail.gmail.com> <20110215145335.5f666400@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2011/2/15 RW <rwmaillists@googlemail.com>: > On Tue, 15 Feb 2011 12:57:12 +0300 > Peter Andreev <andreev.peter@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik4xrt%2Bg3CaoBNsgj8jepbrCrU1Wp-x_m1DBKpJ>