- Jason
> Is there an easy way to duplicate owner permissions to the group?
> ie 730 -> 770, 404 -> 444
I use something like:
find "$dir" ... \
-exec chmod g-rwx {} \; \
\(
\( -perm -0100 -exec chmod g+x {} \; \) -o \
\( -perm -0200 -exec chmod g+w {} \; \) -o \
\( -perm -0400 -exec chmod g+r {} \; \) \
\)
For one file, you could use:
chmod $(stat -c %a ${file} | sed -e 's/\(.\)\?\(.\).\(.\)$/\1\2\2\3/') ${file}
--
__Pascal Bourguignon__ http://www.informatimago.com/
PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this product, in any
manner whatsoever, will increase the amount of disorder in the
universe. Although no liability is implied herein, the consumer is
warned that this process will ultimately lead to the heat death of
the universe.
> Is there an easy way to duplicate owner permissions to the group?
> ie 730 -> 770, 404 -> 444
chmod g=u filename
--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
"Barry Margolin" <bar...@alum.mit.edu> wrote in message
news:barmar-18CFC4....@comcast.dca.giganews.com...