Monday, October 5, 2009

Mass-change of Directory/File permissions @ command line.

A Quick note on how to change permissions of a whole directory structure and/or all containing files.

  1. Changing permissions of Files in a directory structure, (starting point is current directory)(Example: set all files to 644)

    Sudo find . -type f -exec chmod 644 {} \;
  2. Changing permissions recursively of all directories from current directory as starting point. (Example: set directories to 755)
    Sudo find . -type d -exec chmod 755 {} \;

No comments:

Post a Comment

Please be courteous, even if you do not share the same view.