Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh tips for "UNIX Power Tools"



Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx> writes:

> On Sat, Mar 04, 2000 at 12:08:21AM +0100,
> Bruce Stephens <bruce+zsh@xxxxxxxxxxxxxxxxxxxx> wrote:

[...]

> > What's wrong with
> > 
> >         chmod -R go+rX .
> 
> It simply sets wrong permissions :-)
> (and not every chmod has -R, which is bad)
> 
> [from "man chmod"]:
>        The letters `rwxXstugo' select the new permissions for the
>        affected users: [...] execute only if the file is a directory
>        or already has execute permission for some user  (X)
> Oops - there's already some plain file mode 755 which I want to have
> mode 644 - your solution won't work...

Yes, depends on what you're trying to do.  I was thinking of having a
tree of files and making them accessible to other people; you seem to
be thinking of having a tree of files which (incorrectly) are
executable (perhaps because they come from a zip file or something).

It's also doubtless the case that some chmod's don't have -R and/or X,
although Solaris 2.5.1 does, so it's not *just* GNU chmod that works.



Messages sorted by: Reverse Date, Date, Thread, Author