On 23/02/16 12:51, Andrzej Telszewski wrote:
On 05/02/16 13:48, Martijn Dekker wrote:
2. The following horrible, broken and obsolete eyesore:

find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
   -o -perm 511 \) -exec chmod 755 {} \; -o \
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

can be replaced by:

    chmod -R a-st,u+rwX,go-w+rX .

I advocate this solution.
Can we switch for it?
Or at least would the SlackBuild be accepted if I used this construct?


For the moment I was worried about what is going to happen with symbolic links, man page to the rescue:

"chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. *In contrast, chmod ignores symbolic links encountered during recursive directory traversals.*"

Tested, works as expected.

--
Best regards,
Andrzej Telszewski
_______________________________________________
SlackBuilds-users mailing list
[email protected]
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/

Reply via email to