Linux Shell Scripting Cookbook(Third Edition)
上QQ阅读APP看书,第一时间看更新

Applying permissions recursively to files

Sometimes, you may need to change the permissions of all the files and directories inside the current directory recursively. The -R option to chmod supports recursive changes:

    $ chmod 777 . -R

The -R option specifies to change the permissions recursively.

We used . to specify the path as the current working directory. This is equivalent to $ chmod 777 "$(pwd)" -R.