[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] chmod -R ?



rs at ale.spam.futz.org wrote:
>> find . -name '*.txt' -exec chmod a-x {} \; -print
> 
> xargs is your friend:
> 
> find . -name '*.txt' -print0 | xargs -0  chmod a-x
> 
> This will save you from exec'ing chmod for every single txt file..

I'm pretty sure 'chmod -R' used properly would be faster, and is smart 
enough to not run against single files.

In general, a single process is going to be faster then two.
(find ... | xargs)

-- 
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson