- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 67字
- 2021-07-09 19:46:28
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.