file permissions
Gary Thornock
gthornock at yahoo.com
Fri Jan 20 11:53:51 MST 2006
--- Corey Edwards <tensai at zmonkey.org> wrote:
> On Fri, 2006-01-20 at 10:31 -0700, Stuart Jansen wrote:
>> On Fri, 2006-01-20 at 10:13 -0700, Russel Caldwell wrote:
>>> Is there an easy way of changing file permissions recursively
>>> without changing directory permissions?
>>
>> I know there's already two good responses, but neither is 100%
>> correct so I'm tossing my hat in the ring.
>>
>> find . -type f | xargs chmod u=rwx,g+rx,o=
>
> To be completely safe you should use null separators to account
> for files with spaces.
>
> find . -type f -print0 | xargs -0 chmod ...
You're right, and that's the main reason I usually use find -exec
instead of find | xargs.
More information about the PLUG
mailing list