in reply to chmod 775 on all files

As others said before 775 is also executable. If I want to make everything in my dir "rw" for me and my group and "r" for everyone else and all subdirectories "x" I don't use perl but 2 chmod-s with find and xargs:
find /my/dir -type d | xargs chmod 775 find /my/dir -type f | xargs chmod 664
Update: changed type 7 to type f

Replies are listed 'Best First'.
Re: Re: chmod 775 on all files
by MidLifeXis (Monsignor) on Jul 30, 2003 at 10:44 UTC

    I am always learning, but unless I am mistaken, I think the second find should be...

    find /my/dir -type f | xargs chmod 664

    Update:Removed strikeout on '7' from previous code to make slightly clearer. (cosmetic)

    Update:s/644/664/ - Quite right Skeeve. Typo.

      if you meant the change from 7 to f, you're right
      if you meant 644 instead of 664, you're wrong ;-)