Alex Donald
  • Projects
  • Reference
  • About
  • Contact

chmod files and directories recursively

13 January, 2016
CLI • Bash
Source: http://superuser.com/questions/91935/how-to-chmod-all-directories-except-files-recursively

To recursively give directories read&execute privileges:

find /path/to/base/dir -type d -exec chmod 755 {} +

To recursively give files read privileges:

find /path/to/base/dir -type f -exec chmod 644 {} +
© 2022 Alex Donald · pgp.txt