2 edited tags
| link
    Tweeted twitter.com/#!/StackUnix/status/217430684174778368
1
source | link

Is it possible to represent the +X symbolic permission with an octal value?

Is it possible to represent the +X symbolic permission with an octal value? The chmod(1) man page says:

execute/search only if the file is a directory or already has execute permission for some user

which means that chmod -R g+X will add the group execute permission only if there's already an execute bit set for user, group, or other. You could certainly do this the hard way with find:

find . -perm /ugo=x -exec chmod g+x {} \;

However, it's not obvious how one could do the same thing with an octal mode without using find or test to check the file permissions first. Is this possible, or are there some areas where symbolic and octal permissions just don't overlap?