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

Re: chmod problem



On Tue, Apr 22, 2003 at 11:09:55AM +0200, Gossen Alexey wrote:
> On Tue, 22 Apr 2003 09:57:56 +0400
> Yuriy Vostrikoff <mon@lcpi.ru> wrote:
> 
> > Gossen Alexey <alegos@gmx.net> writes:
> > 
> > 
> > > #for p in `find /pub -type f`; do chmod 660 $p; done
> > > файлы с пробелами, нестандартными символами ' & [ ] и т.д. не изменяются (!)
> > > #for p in `find /pub -type f`; do chmod 660 \"$p\"; done
> > > безрезультатно, поступаю хитрее
> > > #for p in `find /pub -type d`; cd $p && chmod 660 *; done
> > > во всех вариантах - "$p" \"$p\"
> > > опять нет
> > 
> > man find; man xargs
> > 
> > find /pub -type d -print0 | xargs -0 chmod 775 
> > 
> спасибо, очень помогло, вопрос закрыт

странно, у меня в man chmod написано:
... , execute only if the file is a directory or already has execute
permission for some user (X), ...

получается: chmod -R +X /pub
хотя find /pub -type d -print0 | xargs -0 chmod 775 это unix way :)

-- 
/mator



Reply to: