Bash Script

Andrew Kelly akelly at corisweb.org
Wed Jul 11 09:01:00 UTC 2007


On Wed, 2007-07-11 at 10:37 +0200, Alexander Dalloz wrote:
> Andrew Kelly schrieb:
> > On Tue, 2007-07-10 at 19:46 -0500, John Pierce wrote:
> >> Thanks, for all of the suggestions.  I have been reading man find and xargs.
> > 
> > I'm curious, why pipe to xargs when find can handle things itself?
> > $ find /path -type f -exec chmod ugo-x {} \;
> > 
> > Andy
> 
> Because that opens a subshell for each of the findings. So depending on
> what you want to execute it "-exec" may have a bigger impact on your
> system's performance. At least it takes much longer to proceed.

Ah, yes, excellent point. Thanks.

Andy




More information about the fedora-list mailing list