Date: Sat, 2 Feb 2008 20:53:48 +0100 From: "Simon L. Nielsen" <simon@FreeBSD.org> To: Ceri Davies <ceri@submonkey.net> Cc: cvs-src@FreeBSD.org, Hartmut Brandt <hartmut.brandt@dlr.de>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Dag-Erling Smorgrav <des@FreeBSD.org> Subject: Re: cvs commit: src/etc/periodic/security 100.chksetuid Message-ID: <20080202195347.GE11904@zaphod.nitro.dk> In-Reply-To: <20080202193344.GI6064@submonkey.net> References: <200802021227.m12CRcZ9008161@repoman.freebsd.org> <20080202145321.GH6064@submonkey.net> <20080202160451.GD11904@zaphod.nitro.dk> <47A49FBF.2010301@dlr.de> <20080202193344.GI6064@submonkey.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2008.02.02 19:33:44 +0000, Ceri Davies wrote: > On Sat, Feb 02, 2008 at 05:52:15PM +0100, Hartmut Brandt wrote: > > Simon L. Nielsen wrote: > >> On 2008.02.02 14:53:21 +0000, Ceri Davies wrote: > >>> On Sat, Feb 02, 2008 at 12:27:38PM +0000, Dag-Erling Smorgrav wrote: > >>>> des 2008-02-02 12:27:38 UTC > >>>> > >>>> FreeBSD src repository > >>>> > >>>> Modified files: > >>>> etc/periodic/security 100.chksetuid Log: > >>>> Rewrite to consume significantly less memory, by using find -s instead of > >>>> find | sort. As a bonus, this simplifies the logic considerably. Also > >>>> remove the bogus "overruning the args to ls" comment and the corresponding > >>>> "-n 20" argument to xargs; the whole point with xargs is precisely that it > >>>> knows how large the argument list can safely get. > >>> Why use xargs at all? The "-exec ls -liTd {} +" primary would do the > >>> same thing. > >> > >> You would end up executing ls a lot more times with the extra overhead > >> for fork() etc. per file. > > > > I think "-exec ... {} +" collects as much arguments before executing just > > as xargs does. This is different from "-exec ... {} ;" which execs for each > > argument. > > Exactly my point, yes. I have never sumbled onto the "+" version only ";" so I just read it as ";". You (hopefully) learn something new everyday :-). -- Simon L. Nielsen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080202195347.GE11904>