Bash Script

Alexander Dalloz ad+lists at uni-x.org
Wed Jul 11 08:37:36 UTC 2007


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.

Alexander





More information about the fedora-list mailing list