Recursively change all files in your current working directory including files in subdirectories to 644:
find . -type f -print0 | xargs -0 chmod 644
Recursively change all directories in your current working directory including subdirectories to 755:
find . -type d -print0 | xargs -0 chmod 755
chmod -R doesn’t make a distinction between files and directories.
The following is equal to the above commands:
find -type f -exec chmod 644 {} +
find -type d -exec chmod 755 {} +
yes, but chmod -R doesnt discriminate between files and directories…
chmod -R 644 *
also works!