[ale] chown options

Geoffrey esoteric at 3times25.net
Wed Jan 19 14:32:30 EST 2005


Jason Day wrote:
> On Wed, Jan 19, 2005 at 10:57:22AM -0500, Geoffrey wrote:
> 
>>Ryan Fish wrote:
>>
>>>Hello all,
>>>
>>>Is it possible to perform a recursive chown but exclude one
>>>particular directory?  If so, how would it be done?  I have yet to
>>>find any info on this online so I figured I would ask...
>>
>>find . -print|grep -v $DIRECTORY_TO_EXCLUDE|xargs -n 10 chown foo.bar
> 
> 
> A slightly faster way:
> 
> chown -R foo.bar `find . -type d -print | grep -v $DIRECTORY_TO_EXCLUDE`

How is this faster?  You're invoking three processes, I'm invoking three 
processes.  In reality, I beleive the `` syntax is actually more costly 
then another pipe.  Feel free to prove me wrong though. :)


-- 
Until later, Geoffrey



More information about the Ale mailing list