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.