bug-coreutils
[Top][All Lists]
Advanced

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

Re: possible new feature for chmod


From: Paul Eggert
Subject: Re: possible new feature for chmod
Date: 04 Aug 2003 16:42:53 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Steve Summit <address@hidden> writes:

> "-rw-rw-r-" is acceptable as such a string, with (I gather) the
> interpretation "turn off rw for all, and rw for all, and r for
> all, and nothing for all".

I really like the basic idea, but I'm worried that the change as
written will confuse users quite a bit, due to the overloaded string.
Also, it doesn't strictly conform to POSIX, so it'd have to be
disabled if POSIXLY_CORRECT is set, which is still more hassle.

Why not fix these problems by disambiguating the syntax?  You can put
a new character in front of the new-format mode strings.  E.g.,

  chmod %-rw-rw-r-- file

This generalizes easily to the other commands.


If done cleerly enough, you could even combine the new syntax with
the old, e.g.:

  chmod %-rw-rw-r--,a+x file

which would be equivalent to

  chmod %-rwxrwxr-x,a+x file

except that it's easier to use the former in a shell script that
accepts 'ls' output.  But perhaps this is _too_ fancy.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]